some cleanup in html template
fix invalid error JSON
allow to shutdown server :)