 				domain: get: -> 'localhost'
 			)
 			
-			# Set up a DOM starting with our entry point.
+			# Set up a DOM, forwarding our cookie and navigating to the entry
+			# point.
 			document = jsdom(
-				index
-				null
+				index, jsdom.defaultLevel
+				
+				cookie: cookie
+				cookieDomain: 'localhost'
 				url: "http://localhost:#{http.port()}/shrub-entry-point"
 			)
-			
-			# Hax for XMLHttpRequest
-			document.cookie = cookie
-			document._cookieDomain = 'localhost'
-			
 			window = document.createWindow()
 			
-			# Capture console logs.
+			# Capture "client" console logs.
 			window.console = logger
 			
 			# Hack in WebSocket.

		locals = res.locals
		body = req.body
		
		# Get a DOM window.
		angularWindow(id, req.headers.cookie, locals).done (window) ->
			
			shrub = window.shrub
			
			routes = shrub.$route.routes
			if routes[path]?
			
				# Does this path redirect? Do an HTTP redirect.
				if routes[path].redirectTo?
					return res.redirect routes[path].redirectTo
				
			else
				
				# Is there no path entry? Check for a default.
				if routes[null]?
					return res.redirect routes[null].redirectTo
			
			# Navigate the Angular system to the new path.
			navigate(window, path, body).done (delay) ->
				
				# I'm not sure how to synchronize this.
				setTimeout(
					->
						
						# Emit the HTML as it appears.
						res.end window.document.innerHTML
					delay
				)

			
			# Give a few extra ms for form logic.
			delay + WINDOW_RENDER_TIME
		
	(req, res, next) ->
		{path} = url.parse req.url
		
