forgot password refactoring