Tests for csrf tokens

Added tests for csrf tokens.