Fixed: endless redirection loop when the STS returns an error.