Writing tests for login