Change the way to handle domainName parameter in login phase