#30001
https://clickhouse-test-reports.s3.yandex.net/30001/b24b458df7a773925324df83bc646ba83d07be8d/stress_test_(undefined).html#fail1
```
../src/Interpreters/SessionLog.cpp:216:32: runtime error: member call on null pointer of type 'DB::IAccessEntity'
    #0 0x1cdfd359 in DB::SessionLog::addLoginSuccess(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&, std::__1::optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, DB::Context const&) obj-x86_64-linux-gnu/../src/Interpreters/SessionLog.cpp:216:32
    #1 0x1cdf2283 in DB::Session::makeQueryContextImpl(DB::ClientInfo const*, DB::ClientInfo*) const obj-x86_64-linux-gnu/../src/Interpreters/Session.cpp:465:26
    #2 0x1db2245f in DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) obj-x86_64-linux-gnu/../src/Server/HTTPHandler.cpp:517:29
    #3 0x1db29152 in DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) obj-x86_64-linux-gnu/../src/Server/HTTPHandler.cpp:929:9
    #4 0x1dbb9bf8 in DB::HTTPServerConnection::run() obj-x86_64-linux-gnu/../src/Server/HTTP/HTTPServerConnection.cpp:58:34
    #5 0x1e97f72b in Poco::Net::TCPServerConnection::start() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #6 0x1e97fbc4 in Poco::Net::TCPServerDispatcher::run() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #7 0x1ea70146 in Poco::PooledThread::run() obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #8 0x1ea6da0b in Poco::ThreadImpl::runnableEntry(void*) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #9 0x7f67edd2e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9608)
    #10 0x7f67edc55292 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x122292)
```


Session::~Session()
{
    
    if (named_session)
        named_session->release();
    if (notified_session_log_about_login)
    {
        if (auto session_log = getSessionLog(); session_log && user)
            session_log->addLogOut(session_id, user->getName(), getClientInfo());
    }
}
Authentication::Type Session::getAuthenticationType(const String & user_name) const
{
    return global_context->getAccessControlManager().read<User>(user_name)->authentication.getType();
}
Authentication::Type Session::getAuthenticationTypeOrLogInFailure(const String & user_name) const
{
    try
    {
        return getAuthenticationType(user_name);
    }
    catch (const Exception & e)
    {
        if (auto session_log = getSessionLog())
            session_log->addLoginFailure(session_id, getClientInfo(), user_name, e);
        throw;
    }
}
void Session::authenticate(const String & user_name, const String & password, const Poco::Net::SocketAddress & address)