Obedience training serves many purposes and not just obedience. It stops dominance and often helps with fear aggression. Training keeps you as the leader/boss. As boss, YOU make the decisions on who is there and if they can come and go or not. It sounds like he doesn't want people to go and this is trying to reprimand them/you when you want to leave.
So you will want to start back up obedience training. Males typically fully mature around 18 months and frequently start taking over from an owner if they haven't had ongoing obedience. So start that back up. The following site is helpful for teaching you how to train your dog. Be sure and click on the link to the page on obedience at the bottom. and links on subsequent pages leading to detailed instructions.
Training works best if you train at least 30 minutes a day (two 15 minute sessions). I would start making your dog work via the Nothing in life is free program (NILF). It is outlined below.
Teach sit, down and come. You need a release command so you can have him sit until you give the release command. I use the word "GO". If you train him to sit and wait for the other command, then you can have him sit while people leave and reward her when she obeys the sit and again when she waits for the release command.
When first teaching him to sit at the door when visitors leave, you can slip the leash under your foot, have him sit and use the leash to keep him in that spot in a sit or down position as you open the door. Initially he will fight it, but soon will realize it doesn't do any good to try and move away and will stay. When he does that reward him. Have visitors reward him as well. Use special treats like hot dog (vienna sausage) slices or liver slivers.
You can also teach your dog the quiet command. It seems easier to teach the quiet command after the dog has learned the speak command. The following site explains teaching speak and quiet commands.
You also have the option of getting a bark collar such as citronella spray collar, shock bark collars that will stop excessive barking.
I hope this information is helpful to you and you are satisfied with my response. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have