implemented logout()