Simplified csrf controller code.