removed middleware class and replaced with check_profile and check_subscription decorators