The relative phase of two initially independent Bose-Einstein condensates c
an be laser cooled to unite the two condensates by putting them into a ring
cavity and coupling them with an internal Josephson junction. First, we sh
ow that this phase cooling process already appears within a semiclassical m
odel. We calculate the stationary states, find regions of bistable behavior
, and suggest a Ramsey-type experiment to measure the buildup of phase cohe
rence between the condensates. We also study quantum effects and imperfecti
ons of the system.