function logout() { let req = { action: "logout" }; request(req).then(resp => { location.href = "login.php"; }); }