Check study access rights and study exists

 Fix #445
The problem here is that we aren't importing the objects in other objects. In this case it means we don't want to import the user object into the study object. It's to stop circular imports. A previous incarnation of this imported Study in to User object, but during the discussion we settled on sticking to the no imports rule we made previously.