OAuth2 optimalization