protected function _storeTargetUrl() {
        $request = $this->getRequest();
        // Only store targetUrl when method = GET. A redirect to a POST request is useless.
        if (!$request->isGet()) {
            return;
        }

        // Allow ?targetUrl=/path/to/elsewhere on any URL
        if (!$targetUrl = $request->getParam('targetUrl')) {
            $targetUrl = $request->getRequestUri();
            $baseUrl = $request->getBaseUrl();
            /**
             * Remove the baseUrl from the targetUrl. This is neccessary
             * when Garp is installed in a subfolder.
             */
            $targetUrl = Garp_Util_String::strReplaceOnce($baseUrl, '', $targetUrl);
        }

        if ($targetUrl !== '/favicon.ico' && !$request->isXmlHttpRequest()) {
            $store = Garp_Auth::getInstance()->getStore();
            $store->targetUrl = $targetUrl;
        }
    }