Move the logout template to a file

Preparing for logout hooks/waits so that events can finish
processing before a logout is processed