Refactor oauth

Simplify login with credentials. All login-related helper methods are private now.