fix infinite loop in request_password

fix issue 1979 on google code