Added server side check for deletion

Fixes #205

JavaScript for delete function is not passed to the browser unless user has permission.