def login(env):
    vca = vcloudair.VCA(
        host=env['vcloud_url'],
        username=env['vcloud_username'],
        service_type=env['vcloud_service_type'],
        version="5.7",
        verify=False)
    logined = (vca.login(env['vcloud_password']) and
               vca.login_to_instance(env['vcloud_instance'], env['vcloud_password']) and
               vca.login_to_instance(env['vcloud_instance'], None,
                                     vca.vcloud_session.token, vca.vcloud_session.org_url))
    if logined:
        return vca
    else:
        return None