domain mapping using mixed domain names on logon page

I have two domains under multisite using the Multi-Domains plugin to allow user ability to register under either domain. When I enable Domain Mapping, the user/site logon pages start to display mixed content. This is present with and without an SSL (self-generated) in use.

With Domain Mapping on, the browser states script is not being loaded at the logon screen. When you attempt to logon, it does nothing. After looking at the source, it seems the logon page is putting mainsite.tld and secondsite.tld both on the logon page, with the logon credentials being passed to a different domain than the one in the URL bar.

Discovered when attempting to run SSL, but error is also present when SSL is off and Domain Mappings is enabled.