Dissipation induced coherence of a two-mode Bose-Einstein condensate.