Updated connect middleware to use non JSONP version and set security to false for PhantomJS to allow CORS loading from localhost. Updated error handling in API due to xhr considering a 404 resource a successful load, which it is.