added nonce fields
added autosave check; prepared code for other checks