add better auth check