Check study access rights and study exists

 Fix #445
The message is actually going to go into the python logger when we go out of tornado debug mode. It's for logging in this case.