Laser cooling in Calcium and Magnesium atomic beams