move client lib to webjars, fix some bugs