refactored login page