The role of the immune response in the effectiveness of antibiotic treatment for antibiotic susceptible and antibiotic resistant bacteria