Adding csrf implementation