A JavaScript test to see if one can log in to basic auth via XHR