little change in check_auth