refactored the tests and fixed logout by adding session clear