Everyone here posted some great resources but a couple things to keep in mind:
1. By law the security deposit cannot be more than twice the rent (ie if rent is $2,000/month then the deposit cannot exceed $4,000).
2. If you do prepay the rent, you have to do a minimum of 6 months worth, not any less.
Both of these rules are per CA law.
Hope this helps!