I would say your dog is showing domination by urinating in your house, and especially when you have people over. He's showing that he is the boss, and can do what he wants. You must be firm with him, show him YOU are boss, not him, and put him outside every time he does it with a good scolding.