User map

So these commit contains now all the bugfixes mentioned from you in the previous closed PR.

I suggest to read also the comments in the source code.

Please comment on things which bothers you :-)
Would it be too much for  me to ask to see if you could put up a staging version of it for testing?  This hits two birds with one stone: makes it easy for me to test and also helps to ensure that any configuration issues or deploy issues have been figured out, so that I don't have to worry about whether production will break at all when I deploy.