async def METHOD_NAME(data: UserLoginPayload, request: "Request[Any, Any, Any]") -> User:
    # we received log-in data via post.
    # our login handler should retrieve from persistence (a db etc.)
    # the user data and verify that the login details
    # are correct. If we are using passwords, we should check that
    # the password hashes match etc. We will simply assume that we
    # have done all of that we now have a user value:
    user_id = await memory_store.get(data.email)
    if not user_id:
        raise NotAuthorizedException
    user_id = user_id.decode("utf-8")
    # once verified we can create a session.
    # to do this we simply need to call the Litestar
    # 'Request.set_session' method, which accepts either dictionaries
    # or pydantic models. In our case, we can simply record a
    # simple dictionary with the user ID value:
    request.set_session({"user_id": user_id})
    # you can do whatever we want here. In this case, we will simply return the user data:
    return MOCK_DB[user_id]