I am a landlord but I support tenants 100% if they are above board. I support landords 0% if they aren't. I don't know whether your apartment is illegal or not but I think there is a pretty good case on getting the lease thrown out if it is.
See item 2
[SIZE=4]The Many Legal Reasons to End a Lease[/SIZE]
You can legally end the lease for several reasons, one of which may apply in your case. Review the ones that apply to you:
1.
Uninhabitable conditions, which only need to affect habitability, not necessarily unlivable, and which
may include:
a. Infestations of cockroaches, rats, or other vermin
b. Noxious odors, such as from sewage leaks, mold and mildew, dead rats in the walls, pigeons nesting in the attic
c. Noisy neighbors in your building, or
d. Criminal activity in the building or neighborhood, such as drugs and gangs
2. An illegal unit, such as an illegally converted garage, basement, or attached structure you're living in [a common situation]
3. Government closing down the building, due to:
a. severe illegalities, such as construction without proper building permits, a dangerous structure, and zoning violations
b. fire or other structural damage [red or yellow tagging]
c. earthquake, flooding, or other natural disaster damage [red or yellow tagging], or
d. demolition by the government, such as for Redevelopment goals, eminent domain, tax lien sale, drug-related confiscation
4. Death, severe hospitalization, incarceration, or insanity of the tenant [your legal representative would handle this]
5. Bankruptcy of the tenant [Chapter 7, or abandoning the lease in a Chapter 11 or 13 Bankruptcy proceeding ]
6. The person who rented it to you may not have had the right to do so, because:
a. The person was not the owner, or authorized by the owner, to lease it [a scam used by some con-men]
b. The person was an unlicensed property manager, whose contracts are void [there are many of these]
c. The person was a tenant, who was not authorized to sub-lease or assign the place to you by their rental agreement, or
d. The business entity that is supposed to be your landlord doesn't legally exist [such as a corporation, that isn't one]
7. The lease may be tied to a job on the premises, which you quit, such as a resident manager, grounds keeper, etc.
8. The landlord lost the land by foreclosure, and the bank or new owner took over, but you haven't paid rent to them, yet.
9. The lease is oral, but is for more than a year by its terms, making it void under the Statute of Frauds as a legal matter.
More here
http://www.caltenantlaw.com/breaklease.htm
California Tenant Law - Free legal advice for California renters