try to authenticate by AJAX but failed