Fix logout method