Fix logout statement order