Cavity QED with multilevel atoms