Fixed some small issues with oauth2