Fix user creation when open location that requires login is visited

Fixes #14.