Fixes bug where resetPassword do not save new password in database