var xhr = new XMLHttpRequest();
xhr.withCredentials = true; // Remove this line to solve problem

References