added logout (close #2)