Fix logout issue with access origin policy error (CORS).