Fix password encryption issues

See SOLA Ticket #410