Created on-the-fly hashes field for the old users.
All the user hash history is used in place of the last hash when looking for the user references.
Solved bug on duplication when creating new references.