protected function requestUrl()
    {
        if (!empty($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] !== '/') {
            $request = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
        }

        return add_query_arg('redirect_to', urlencode($request ?? $this->url()), $this->loginUrl());
    }