CAS-1441: added password encoder, and fixed the merge result