Return registy status code in error

Added Details map to the JSONMessage
Return JSONError for HTTPResponse error
Merge pull request #1298 from crosbymichael/1246-auth-request

* Registry: Do not require login unless 401 is received on push