Changed username to email and added xhrFields