Improved the CSRF protection