function isAdmin(){ return $.ajax({ type: 'post', url: '/isAdmin', dataType: "json", async:false, response: 'text' }).responseText; }