Updated to use OAuth2Service, added relevant tests.