Check study access rights and study exists

 Fix #445
Do we have an issue for this? if so, can you write down the issue number here?