User login complete with tests