1 2 3 4 5
function logoutThenRedirect() { $.post("/logout").done(function(data) { window.location.replace("/"); }); }