def METHOD_NAME(cur_pos=0):
    """Wait for login guest."""
    content, next_pos = slof.wait_for_loaded(vm, test, cur_pos)
    error_context.context("Check the output of SLOF.", test.log.info)
    slof.check_error(test, content)
    error_context.context("Try to log into guest '%s'." % vm.name,
                          test.log.info)
    timeout = float(params.get("login_timeout", 240))
    session = vm.wait_for_login(timeout=timeout)
    test.log.info("log into guest '%s' successfully.", vm.name)
    return session, next_pos