fixes #3475 - make it possible to force the 401 status.