move study access check to user object
pep8 and change to use new user function