  The theory for the vanishing of N\'eel order in the spin $S=1/2$ square
lattice antiferromagnet has been the focus of attention for many decades. A
consensus appears to have emerged in recent numerical studies on the
antiferromagnet with first and second neighbor exchange interactions (the
$J_1$-$J_2$ model): a gapless spin liquid is present for a narrow window of
parameters between the vanishing of the N\'eel order and the onset of a gapped
valence bond solid state. We propose a deconfined critical SU(2) gauge theory
for a transition into a stable $\mathbb{Z}_2$ spin liquid with massless Dirac
spinon excitations; on the other side the critical point, the SU(2) spin liquid
(the `$\pi$-flux' phase) is presumed to be unstable to confinement to the
N\'eel phase. We identify a dangerously irrelevant coupling in the critical
SU(2) gauge theory, which contributes a logarithm-squared renormalization. This
critical theory is also not Lorentz invariant, and weakly breaks the SO(5)
symmetry which rotates between the N\'eel and valence bond solid order
parameters. We also propose a distinct deconfined critical U(1) gauge theory
for a transition into the same gapless $\mathbb{Z}_2$ spin liquid; on the other
side of the critical point, the U(1) spin liquid (the `staggered flux' phase)
is presumed to be unstable to confinement to the valence bond solid. This
critical theory has no dangerously irrelevant coupling, dynamic critical
exponent $z \neq 1$, and no SO(5) symmetry. All of these phases and critical
points are unified in a SU(2) gauge theory with Higgs fields and fermionic
spinons which can naturally realize the observed sequence of phases with
increasing $J_2/J_1$: N\'eel, gapless $\mathbb{Z}_2$ spin liquid, and valence
bond solid.
