Getting user access token by API and automatically log in to oauthprovider