Fix logout

Fix logout event.