added autodetect_theme feature without cookie