Adding missing user model methods.
Adding unit tests for entities.