The following works for me:
format.any { render :json => {:response => 'Unable to authenticate' },:status => 401 }
The :response
for the HTML response just in case it's accessed from the browser.
The render head 503 does not seem to be working with the above statement.