Check study access rights and study exists

 Fix #445
I think that change is needed for clarity.