Added password encoding support in CAS