Fix port on interactive login (Fix #12228)

Primary cause was a typo "prt" (which would have been
detected by flake8!) While trying to track this down,
I went ahead and added a more proper regex for the
server string parsing.
Merge pull request #2358 from joshmoore/12228-cli-login

Fix port on interactive login (Fix #12228)