bugfixes for DELETE and PUT (update)

The rewrite rules were missing the doc id.
added basic security

Currently only admins will be able to delete docs or change important properties.