Updated for password encryption