Fix logout npe