Add support for cross-origin resource sharing with credentials.
see http://www.html5rocks.com/en/tutorials/cors/