added state servlet and updated index.html