Tweak userid/permissions implementation.