In any situation, if there are code violations, the tenant needs to notify the landlord, and give him an opportunity to correct. Some municipalities require that a landlord get a Certificate of Occupancy from them before renting - check with your local building or health inspector. But, that is an issue between the town and the landlord, not usually the tenant.
If he doesn't fix the violations it's possible to put your rent in escrow until he does.. But don't ask me how you do that. Try code enforcement for your local P.D.
If it is foreclosed then he does not own it. You cannot rent a property that you do not own.
A landlord is generally a person owns property for rent. A tenant is someone who rents property from a landlord.
A landlord is a person, not a job. You are a landlord when you rent out your property. The job is property management and thus the job title is "property manager".
Generally there is no point in suing a property manager for not collecting rent. It should be noted that the tenant is responsible for paying his rent on time. It is not the responsibility for the landlord to collect the rent. If the landlord does not collect rent and the tenant should send it to the landlord by mail or in person.
No.
A landlord does not need a license to rent to you. They just need to own the property.
Yes, a landlord can still collect rent on a property with a notice of default. The notice of default relates to the mortgage payments on the property and does not impact the landlord-tenant relationship or the tenant's obligation to pay rent.
Yes, you have to pay rent to a landlord whose property is in default. As long as the landlord still has control over the property he can still collect rent from you and evict you if it's not paid. A foreclosure of a home is a matter between the owner of the home and his lender, not the tenant.
That depends on what you mean by illegal, and what state the property is in. Many states have an 'Implied Warranty of Habitability', which means that if there are code violations in the unit, it is technically 'illegal'. Some people use 'illegal' to mean a unit which the landlord never got a permit for. If lack of a permit is the only problem, and everything is fine in the unit, a judge might not order any rent refunded (abated). If there are serious code violations, a judge can order an abatement, depending on the severity and duration of the violations.
The tenant owes the rent to the landlord up the day of a foreclosure sale.
Yes.
That depends on the municipality.