public function getRedirectUrl($returnTo = null)
    {
        $settings = $this->auth->getSettings();
        $authnRequest = new OneLogin_Saml2_AuthnRequest($settings);
        $parameters = array('SAMLRequest' => $authnRequest->getRequest());
        if (!empty($returnTo)) {
            $parameters['RelayState'] = $returnTo;
        } else {
            $parameters['RelayState'] = OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery();
        }
        $url = OneLogin_Saml2_Utils::redirect($this->auth->getSSOurl(), $parameters, true);
        return $url;
    }