NTFY-128 Added some new error codes

Added some error codes for values missing from permission checks
NTFY-128 Removed some obsolete methods, tidied some response handling

I removed a couple of the older methods and tidied up some of the
response handling in light of our standardized error response changes
NTFY-128 Corrected logic for getOrigin

We no longer trust an origin field from the body. Moved some code in
auth.js that got the origin from the request into the getOrigin function
so the logic for origin extraction is available to services