I'm Lucy, and I'd be happy to answer your questions today. I'm sorry to hear about your situation.
You have a legal right to refuse to pay rent because the property is illegal and the landlord should not be renting it to you. However, the flip side to that is, the landlord isn't allowed to have a tenant. It's illegal for you to be there, and that means, in an unlawful detainer lawsuit, you will have to leave. There is unfortunately no way to withhold rent because a place is illegal and retain the right to stay there indefinitely. The landlord can file an unlawful detainer suit, and you will be evicted if you do not move before the court date. The judge cannot order the landlord to pay you rent, because he's not legally entitled to rent, and if you gave a security deposit, he can only keep it if you actually damaged the premises.
Now, the landlord probably doesn't want to file an unlawful detainer suit, because it's going to get him in trouble with the judge. So you're allowed to let him make his threats and wait and not pay and see if and when he actually files. An eviction case takes a few weeks, so it's unlikely that you would have to move before April 1. There are also things you'll be able to do to delay the case, like filing a Motion to Continue the hearing date. But you may want to think about starting to look for a new place to go next month.
Also, if your landlord shows up at your door without notice, you have no legal obligation to let him in. You can tell him to leave immediately or you'll call the police. If he threatens you with physical violence, you can call the police. If he forces his way into the property, call the police immediately. When a tenant doesn't pay rent, the landlord's recourse is to sue, not to terrorize them.
If you have any questions or concerns about what I've written, please reply so that I may address them. If I did not address the specific thing that you wanted to know, it may not have come across clearly to me, so please restate that question. It's important to me that you are 100% satisfied with the service I provide. Otherwise, please rate my service positively so that I get credit for answering your question. Thank you.