$.ajax
({
url:url1,
type:"POST",
data:JSON.stringify({"email":$('#email').val(),"password": $('#pass').val()}),
contentType:"application/json",
dataType:"json",
success: function(){
window.location = url2;
},
error: function(xhr, status, error) {
console.log(xhr);
console.log(status);
console.log(error);
}
});