fix auth check, add logging