Believe it or not your solutions to this problem are very easy.
First practice the Nothing In Life Is Free program:
Your dog is trying to control you and needs a "pack leader." Social structure is very important to a dog.
Second...more exercise. A lot of people think that letting their dog out into a big yard is exercise enough but it isn't. Go out and play ball with him or frisbee. Walk him a couple of times a day. Come up with some creative way to entertain him.