Fix link handling using history API
Output host:port on server start, cleanup output all around