Modified the node.js server to redirect users properly