adding support for themes in config, selecting first url if only one is present