Add Unauthorized error and authorization checks
Add unit tests for server.isNotAuthorized function
Merge branch 'improve-unauthorized-error-handling'