fixing authentication config and freemarker security layout