Check study access rights and study exists

 Fix #445
I think we no longer need those one, in a recent PR we have remove these imports...