Changes to the XSRF implementation to use Sessions and auto renew