Added password encoding support to CAS