Fix 'can't adapt type 'dict'' bug when setting new user password.