Fixed configuration and tests and refactered dehydration of the user entity