moving the isAuthorized method for activity to activity service