Check perms on auto-join, and various fixes.