Added logout feature. Issue #37. No gui button yet.