SO(5) theory of antiferromagnetism and superconductivity