Only set token back if password reset fails.

This prevents the digested version of the token being saved when a reset is successful.
Can we please add a unit test instead of an integration test? :)