added renderMessage function
changed the way the webfrontend treats errors