You conserve more energy by sitting, too. It's all about cadence for me; if I can get in the groove of a fast enough cadence sitting, where I can use that momentum and maintain the beat of the cadence while climbing, I'll stay sitting. And, to keep your front wheel from popping up while sitting, use your hands to pull your handlebar down as you pull them slightly toward you. You'll feel it anchoring the front wheel.

When you're standing, it's all about shifting your weight back and forth. If you're have trouble with control, you could also be spinning in too high of a gear if you're spinning the rear out. Find a tougher gear to stand in. If you could shift up a gear when you stand (just like on a road bike), that would be ideal. Practice keeping your body centered over the BB and slightly shifting back and forth as you stand to keep the weight balanced over your wheels.

One more thought (this helped me), is your stem too long? This could also be throwing off the center of gravity.