[Feature] CSRF refactoring