WIP oauth2-upgrade: oauth2 upgrade and REST fixes

oh! sorry @jirikuncar! I will remove it and i will repush!