User entropy

Replaces #32 and adds a suitable test. Please see that ticket for discussion.

Thanks a lot to @mflaxman for his contribution.