Minor fixes, added OAuth2 support