Fix logout issues.