connect if cookie is not empty