Enable xsrf and modify templates and tests accordingly.