Refactored password reseter