Fixed login screen logic