protected function getReturnUrl()
    {
        $backUrl = $this->getRequest()->getSession()->get('oauth2.backurl');
        if (!$backUrl || !Director::is_site_url($backUrl)) {
            $backUrl = Director::absoluteBaseURL();
        }

        return $backUrl;
    }