fixed bug with password encryption