Refactoring IdentityController Phase 1