fixing bug with creating new users before logging in