WIP oauth2-upgrade: oauth2 upgrade and REST fixes

please remove this empty line too