Corrected password encryption