$.ajax({
    url : "/ajax/loginstatus",
    type: "POST",
    //data : formData,
    dataType: "JSON",
    success: function(data, textStatus, jqXHR)
    {
        if (data.loggedIn !== true) location.replace('/manage/login');
    },
    error: function (jqXHR, textStatus, errorThrown)
    {
        console.log('Error: ' + errorThrown);
    }
});