Fix 'remind login' bug, make code url independent

There was a bug in ‘remind login’ which prevented it from finding
certain users.
Previously, I had to maintain  two versions of the code, one for local
development, another for the real server. Now there’s only one that
adapts to both places.