Refactor OauthController