Fixes bug with CSRF tokens if session has timed out.