changes to the login procedure *(emails not working)