Implemented logout feature.