The generation of magnetic fields by the Biermann battery and the interplay with the Weibel instability