wrote test cases for test_login