Username was getting domain portion added twice because of username being full email address, and no check for domain portion.