Fix login in case when default_host is an array with one element (#1488928)