I have a WCF Service URL like https://crm.xxxx.com/XRMServices/2011/Discovery.svc?wsdl. But if I open this URL in a browser window, I will get an authorization screen:

I get an exception if I try to add this URL in my C# code:
ServiceConfigurationFactory.CreateManagement<T>(new Uri(url));
Exception: Metadata contains a reference that cannot be resolved: "https://crm.xxxx.com/XRMServices/2011/Discovery.svc?wsdl".
or
Exception: Metadata contains a reference that cannot be resolved: "https://crm.xxxx.com/XRMServices/2011/Organisation.svc?wsdl".
How can I access the web service from my client application if I have user login and password?