Fix logout issue