First, find a new place to live. Second, sue him for wrongful eviction, breaches of warranties, and the money that you are out due to his actions. It doesn't sound like any of that is legal.
If the total amount is lower than 10k, you can file in small claims court. If you are suing for more than 10K, you can sue in limited jurisdiction.
Thomas A. Schaeffer, Esq. Law Office of Juarez and Schaeffer PO Box 16216, San Diego, CA 92105 (619) 804-4327 www.jslaw.org This posting is provided for "informational purposes" only and should not be relied upon as "legal advice." Nothing transmitted from this posting constitutes the establishment of an attorney-client relationship. Applicability of the legal principals discussed here may differ substantially in individual situations or in different States.
In addition, you could bring an action for forcible detainer, which is like an unlawful detainer except that the tenant brings it against a landlord. You can also try calling the police. Locking out a tenant is a crime.