Critical fields and critical currents in MgB2