simplify isAuth func