Quantum control and quantum chaos in cavity QED