factor out OAuthClient