Oh yeah, this is definitely not the correct way to be doing this.  It should be hitting specific urls, not hitting / and walking them through this.