global: fix for testing 401 after redirection

* Addresses issue with testing HTTP 401 status code after redirections
  to secure page.  (closses #1883)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>