Fix unit testing for Login