Constructs a basic authentication header from the user name and password supplied, and adds it to the request headers.
It is used when shouldPresentCredentialsBeforeChallenge is set to YES.