xdmp:logout() as empty-sequence()
Logs the current user out of the session on the server. The result is that the current user is set to the default user defined in application-level authentication. The session remains on the server until it expires.
xdmp:logout() => ()