add registration errors to the json response body

closes #173