Redirecting to the main domain for login.
Updating server shutdown function.
Tolerating public routes, adding configuration for the cookie domain used.
Ensuring we only perform a redirect if we have somewhere to redirect to.
Addign logic to ensure that we tolerate not having the res location set, this appears to be used in older versions of node.