Support for oauth2 authentication

Fixes #28.