IDENTITY-2821 authentication.endpoint

check initialized in the if. Add a debug log in the else