Fix logout issue with modal.