Check authentication.