If \[ f(x)= \begin{cases} \dfrac{x^2-4x-5}{x+1}, & x\neq -1 \\ k, & x=-1 \end{cases} \] is continuous at \(x=-1\), then the value of \(k\) is: