[EXT-287] allow for non-standard ports in token_url

also includes some whitespace cleanup