Fix logout and chat