implementing user has password in hook menu
If you check the functions being called, you'll there's a randomness in generating the hash for security reasons. I think that is not a problem. Have you tried using that as the stored password and logging in afterwards?