Minor bug fixes
More security in the CSRF stuff