raise RuntimeError instead of Unauthorized for functional tests.

so that we will not have HTTP authentication dialog in case of  Unauthorized exception to prevent blocking in functional tests.