Add authorization checks, fix fuse thread exit