Refactored login code in OAuthController, reused in AccountController. Added tests.
admin_token
admin_api_params/0
update_?