Fix authentication with credentials containing characters to be encoded.
Automatically handle authentication header name depending on the endpoint.
Merge pull request #11 from aenain/master

Fix authentication