Check study access rights and study exists

 Fix #445
Yes, it allows for not relying on an instantiated study object to render, which we won't have if the study id passed doesn't exist.