Updated Login section
Refactored login logic