Fix password encryption issues