Effects of a finite axial magnetic field on the beam loading on a cavity