add some generic logging to the wb js, and change routing order for ws server