Refactored Login form