As soon as you walk into the room with Atton, Kreia, and Bao-Dur there should be an option, while talking to Kreia, that says "I'll just let you out then." or something like that. After that, everyone should be out of their cages automatically. If, somehow, Bao-Dur isn't released I suppose it's some sort of glitch 'cause he should get out on his own.
I had the same problem.
I got into the secret base, had the convo with the handmaidens, then talk to Atris and did all that shit, but I still couldnt get out.
Checked gamefaqs.
Realized it got ****ed up. If you dont see the cutscene between Kriea and Atton WITHOUT YOU IN IT, then its ****ed up.
IF you did, then when you got release them, they'res a cutscene.
Also, another sign of it being ****ed up is if Atton and Kriea are still by the door, and if you talk to Atton, it gives you an option to chose to continue Kriea convo, or something else. IT will say Cheat node. If you get this, its ****ed up.
What I did was too load an older save point, and after that it worked. (theyre should be an autosave spot, if you didnt save in different slots).
Whats funny is that even the game says to save in different spots... I suggest you make like 3 or 4 different save spots and save on 2 of those spots every other mission you finish. I had problems when I tried to teach the Handmaiden on how to become a Jedi, it just sent me back to the temple where I couldnt do anything.