added @wchen-r7's code to store the password into the database