authn function to update password