AJAX for logout, new post