Exit the module if name resolution fails.

This is important so that the Javascript code can know that the session is
over, so that it can take appropriate actions.