Check study access rights and study exists

 Fix #445
Sorry... by "implemented" i mean "defined"