added logout and more tests