Thermodynamics of magnetized Kerr-Newman black holes