Enabled connection with OAuth2, but needs to be refactored.