adding one more check if authorization is needed