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 :-)
Let's not call this userModels - I've been trying to use that to refer to an array of model objects.  But this is just an assoc array so we can call it just users.