Adding XSRF protection and Cookie secret setting.