More authentication fixes