Fix logout problem