Fixed a bug where HTTP headers weren't set properly for Token retrieval phase of OAuth2 authentication