change logout request to synchronously