refactor user sign in, tests now consistent