Fixed factory to ignore null loginNames