changed the control flow of change_password()