Chemical potentials in gauge theories