It would be safer to use `=:=` for these comparisons as that does an exact equal and no type coercion. I think we don't want to equate `1`  with `1.0`, for example.

I think a small helper function along the following lines would clean things up a bit:
```
canonicalize_userid(UserId, SignVersion)
```

The implementation can then match on the sign version in the fun head.