Make sure csrf tokens match on client and server.

This pull request is an improvement when loading up the web editor. In some scenarios, the editor would not detect an authenticated user and would redirect to the login page, which in turn would redirect to the dashboard. This pull request corrects this.