don't depend on HttpUrlConnection to read header data from the response
add some error 401 tests