modified config.js.tpl for new requirements
added missing parameter hostname :-)
extracted routing into own file
added logout functionality