implemented logout feature.