verify API key with AJAX. and show error messages