adds helper method to check user authorization