Save and validate the XSRF token.