Galaxy Formation in a Magnetic Universe