Coherent excited states in the theory of superconductivity: gauge invariance and the Meissner effect