diff --git a/trac/timeline/web_ui.py b/trac/timeline/web_ui.py
--- a/trac/timeline/web_ui.py
+++ b/trac/timeline/web_ui.py
@@ -185,7 +185,8 @@
             req.session['timeline.daysback'] = daysback
 
         add_stylesheet(req, 'common/css/timeline.css')
-        rss_href = req.href.timeline([(f, 'on') for f in filters],
+        alt_href = req.authname != 'anonymous' and req.auth_href or req.href
+        rss_href = alt_href.timeline([(f, 'on') for f in filters],
                                      daysback=90, max=50, format='rss')
         add_link(req, 'alternate', rss_href, _('RSS Feed'),
                  'application/rss+xml', 'rss')
diff --git a/trac/web/api.py b/trac/web/api.py
--- a/trac/web/api.py
+++ b/trac/web/api.py
@@ -159,8 +159,18 @@
         self.base_url = self.environ.get('trac.base_url')
         if not self.base_url:
             self.base_url = self._reconstruct_url()
+        
+        # Mirror the complete application below /login
+        path_info = self.path_info
+        base_path = self.base_path
+        if path_info.startswith('/login/'):
+            environ['PATH_INFO'] = path_info[6:]
+            environ['SCRIPT_NAME'] = base_path + '/login'
+            self.base_url += "/login"
+        
         self.href = Href(self.base_path)
         self.abs_href = Href(self.base_url)
+        self.auth_href = Href(base_path + '/login')
 
     def __getattr__(self, name):
         """Performs lazy attribute lookup by delegating to the functions in the

