Topological Terms, Quantum Magnets and Deconfined Criticality