add error handler, 404 and 500 html template, error log and unit test, fix a bug allow duplicated nicknames