changed response to render on all but 204/205 and redirect
updated response to render as JSON when an object