Change password take 2

This patch is making my head hurt. I seemed to think I did not need to unravel() inside the changePassword function, but after now attempting to do so, I get JSON exceptions like: "JSON.stringify cannot serialize cyclic structures." 

@ecto can you check out this branch and see what I am doing wrong?

(I am just trying to run the integration tests, and have commented out all others for now)
for (x in y) may yield unexpected behavior. A classic for (;;) loop would be safer.