Added session support, moved router to the correct place