inject session and homepath into template