Hide Report node when unauthorized

Also did some refactoring.