add AJAX authentication