Wrap around SimpleSAML_Utilities::redirectTrustedURL instead of the deprecated redirect().