added logout feature as well as unit test