moving classes from lib to OAuth2