Adds OAuth2 authentication for the api