Polished the login authentication