refactored login screen