Fix bug in User#resetPassword