Fix ?next= path in some cases.

For URLs with a port indicator (":"), this wasn't working without the
schema portion of the URL.