reorganized tests and added logout test