U(1) lattice gauge theory near the phase transition