Basic Authentication 

When you use a private,  password protected, repository you can use "--index-url https://user:pass@example.com" on the command line to access it.

Anyway this is not suitable when you are using a Continuos Integration engine (Buildbot) because the credentials are clearly available in the log.

Usually, when you have a private repository, you store your credentials in the .pypirc file to allow you to upload the packages
This patch use the credentials in the .pypirc to  load the HTTPPasswordMgrWithDefaultRealm used by the UrlOpener.
Also remove the FIXME about the 401 error handling.
It's very simple, only one file and few lines of code, but IMHO required to use pip with password protected repositories