refactor the merging of anonymousBasket and setting of client when the userName is anonymousUser