implemented better hash and made user entities strong to avoid creating unnecessary duplicate instances