  In the context of the holographic duality, the entanglement entropy of
ordinary QFT in a subregion in the boundary is given by a quarter of the area
of an minimal surface embedded in the bulk spacetime. This rule has been also
extended to a suitable one-parameter generalization of the von-Neuman entropy
$\hat{S}_n$ that is related to the R\'enyi entropies $S_n$, as given by the
area of a \emph{cosmic brane} minimally coupled with gravity, with a tension
related to $n$ that vanishes as $n\to1$, and moreover, this parameter can be
analytically extended to arbitrary real values. However, the brane action plays
no role in the duality and cannot be considered a part of the theory of
gravity, thus it is used as an auxiliary tool to find the correct background
geometry.
  In this work we study the construction of the gravitational (reduced) density
matrix from holographic states, whose wave-functionals are described as
euclidean path integrals with arbitrary conditions on the asymptotic
boundaries, and argue that in general, a non-trivial Hayward term must be haven
into account. So we propose that the gravity model with a coupled Nambu-Goto
action is not an artificial tool to account for the R\'enyi entropies, but it
is present in the own gravity action through a Hayward term. As a result we
show that the computations using replicas simplify considerably and we recover
the holographic prescriptions for the measures of entanglement entropy; in
particular, derive an area law for the original R\'enyi entropies ($S_n$)
related to a minimal surface in the $n$ replicated spacetime. Moreover, we show
that the gravitational modular flow contains the area operator and can explain
the Jafferis-Lewkowycz-Maldacena-Suh proposal.
