replace post request with xss friendly ajax call for login form.