Added CSRF protection on forms, housekeeping