Added an XSS check into the login code