We just extended the deadbolts on both connecting doors so that the deadbolts rested against the doorframe on each side. The doors are self shutting, so that meant the doors were normally shut (though not all the way into the door frame) unless someone wanted to go through. Nobody from either side was locked out. To go though, it was a simple matter of opening both doors.
In our case, our kids are older (tween and teen). I could see that if you have young children, the way we did it would not be good.