  We study the dynamics of a Bose-Einstein condensate in a double-well
potential in the two-mode approximation. The dissipation of energy from the
condensate is described by the coupling to a thermal reservoir of
non-condensate modes. As a consequence of the coupling the self-locked
population imbalance in the macroscopic quantum self-trapping decays away. We
show that a coherent state predicted by spontaneous symmetry breaking is not
robust and decoheres rapidly into a statistical mixture due to the interactions
between condensate and non-condensate atoms. However, via stochastic
simulations we find that with a sufficiently fast measurement rate of the
relative phase between the two wells the matter wave coherence is established
even in the presence of the decoherence.
