added a key for api calls and before_filter check