Fix authentication issue with OAuth2