Go to Daly City City Hall (near the DMV), on the third floor - Economic Development department. Ask the person that helps you if your address has an extra "Certificate Of Occupancy." If not, your unit is illegal. Keep in mind if they find out about your in-law unit and it is illegal, they will come out to the address and have the owner DEMOLISH your unit.
Here are a couple of links that might be helpful.
landlord/tenant law: http://www.dca.ca.gov/publications/landlordbook/catenant.pdf
tenant rights and protections http://www.hud.gov/local/ca/renting/tenantrights.cfm
It also has a link to get legal assistance which might be a good source to get all your questions answered.
The lease agreement will likely be a separate issue in your state. If you have problems with others in the same building, I would suggest you talk to your landlord and see if this person can resolve the issue before you try to cause problems by reporting or complaining about a missing building permit.
Write to your landlord and tell him what you told us. Also state that since the inlaw is not legal, you have a right to terminate the lease agreement. In your letter tell the landlord that you will go down to the City Planning Dept and find out for yourself if he is not willing to let you leave early with your deposit. If the unit was built many years ago, it could be what they call grandfathered in.
I'm sure your landlord doesn't want this problem.