Distributed authentication system (different domains, separatate databases)
This might be overkill, but have you considered using something like LDAP? 

There is an LDAP integration module and an LDAP provisioning module. Both of which work quite well.