Writing tests for login and logout