Changing API authnorization check