Well, you have come across a design fault in the login server.
RFC 3986, section 3.2.3 states that
URI producers and normalizers should omit the port component and its ":" delimiter if port is empty or if its value would be the same as that of the scheme's default.
I.e. any URI parser should realize that if the port is omitted, default value of the port must be used, consequently https://login.domain.com and https://login.domain.com:443 are the same URI component.
What you can do is alter the URI if this is needed for login server to accept it.