WIP Csrf plug

very rough
Please ignore the test cases. This is very rough and will clean them up later on