refactoring user mode and omniauth controller for code coverage.