A generalized local U(1) gauge invariance for both the standard and pauli couplings of QED