first part of transition to oauth2

fixes #4:

@gsfr: can you please review/take a look?