fix whereUserType scope
remove rehashPassword method
add more tests