Interactions of electron beams with surfaces of MgO crystals