CODE REFACTORING: Simplified Login design