feat(contentedit): Improved authorization check

Added a middleware function to auth that can be called from request.js
before the route handler for the put routes will be called
So it's no longer necessary to check the authentication in the route handler.
refact(pageservice): Improved the output of api errors