  We present a microscopic laser model for many atoms coupled to a single
cavity mode, including the light forces resulting from atom-field momentum
exchange. Within a semiclassical description, we solve the equations for atomic
motion and internal dynamics to obtain analytic expressions for the optical
potential and friction force seen by each atom. When optical gain is maximum at
frequencies where the light field extracts kinetic energy from the atomic
motion, the dynamics combines optical lasing and motional cooling. From the
corresponding momentum diffusion coefficient we predict sub-Doppler
temperatures in the stationary state. This generalizes the theory of cavity
enhanced laser cooling to active cavity systems. We identify the gain induced
reduction of the effective resonator linewidth as key origin for the faster
cooling and lower temperatures, which implys that a bad cavity with a gain
medium can replace a high-Q cavity. In addition, this shows the importance of
light forces for gas lasers in the low-temperature limit, where atoms can
arrange in a periodic pattern maximizing gain and counteracting spatial hole
burning. Ultimately, in the low temperature limit, such a setup should allow to
combine optical lasing and atom lasing in single device.
