Moved resetPassword to lib