Better way of checking auth