Add head and tail log functions to web interface