A free boundary problem describing transition in a superconductor