allow transfer api_key through headers in ajax
add detail error message for error output