Changed the way the login procedure goes.