Temperature dependence of the critical magnetic field of superconductors