Fixed login bug with alerts and all that stuff