Added error 401.
Implemented protected resource URL.
Standardized JSON responses