Update password function

…still need to fix error messages