Add csrf protection in template