check for user logged in for certain scripts