Train your dog to respect you and stay away from the door when you want to go outside or come inside. Greet him on your terms in a calm manner