Unit test user authentication