It doesn't sound like things were tightened correctly in the first place. You may find (especially if no pipe dope or tape was ever used) that you may not be able to get these connections apart--be prepared for anything. Make sure to use 2 wrenches and back up the stationary fittings. If the corrosion has not eaten the metal away too much, everything should be repairable. What is on the other side of the wall--the drywall side? Can you cut an access hole and cover with an access panel cover?
Be aware that when a novice works on old corroded plumbing it is just as easy (easier?) to end up looking a fool as it is the hero. This is their main. If you do not feel comfortable sweating a union in this confined space, call a plumber.