Added CSRF protection to the framework