How do I stop my dog from barking when we leave?
Barking is such a frustrating behavior. For your specific problem you will need a lot patience and positive reinforcement. Find a day where you have nothing to do so you can work on this. Bring treats or reinforcement with you and place your dogs in the crate. Reinforce them in the crate for short time then let them out. Remember you are reinforcing quiet calm behavior only. Also don’t open the crate till they calm you don’t want them reinforced or struggle to get out. This is where the patience comes in . Small approximations are the next step. Repeat increasing your time slowly every time. You want to make the crate desirable and safe place. Never scold your dogs and then use the crate. The crate is only positive. Personally, I would also do a simple train like sits and stays (whatever you want) then reinforce your dogs for those combined behaviors in the crate. Over time the crate will be their go to place and the barking will subside and be eliminated.
Now at night, if they bark, find out if they are in your room or near your room if the barking goes away. If it does start your dogs in your room and everyday move their bed or crate further and further away till you both seem comfortable with situation.