Make sure csrf tokens match on client and server.
Fix checkstyle violations.
Refactor some exception handling and extract a method.
Merge pull request #527 from zanata/gwt-token-mismatch

Make sure csrf tokens match on client and server.