Refactored the login screen