Adding basic CAS support.

Based on database and not on LDAP.