Fix uninitialised varibales

Set $usertype and $domainname to safe non-null values to prevent
spurious errors being logged