Fix logout bug