Improved client auth checking