rewrote $.get() using ajax instead to give finer control of headers