Fix issue with authentication

The issue was actually related to what http client HTTPI was using. I
manually set it to use :net_http which doesn't seem to have any issues.