Fixed bugs in logout_spec test file