[#1985] Prevented force login on registration if account approval and/or email confirmation needed
Partially fixes #1985
(requires FE change: when POST /api/v1/accounts
returns HTTP 200 [meaning that registration was successful] with identifier
and message
fields and no access_token
, FE needs to display message to user and not do GET /api/v1/accounts/verify_credentials
since it needs a valid token).
Prevented force login on registration if account approval and/or email confirmation needed
Refactored login code in OAuthController, reused in AccountController.
Added tests.