added 'me' api, minor refactoring for oauth2