I try to get the momenta $$p_{\sigma} = \frac{\partial L}{\partial \dot{x}^{\sigma}}$$ from the free one particle Lagrangian $$L = -mc\sqrt{-\eta_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}}.$$ I got to the equation
$$p_{\sigma} = \frac{mc\dot{x}_{\sigma}}{\sqrt{-\eta_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}}}$$
but I don't know how to solve for the velocities $\dot{x}^{\sigma}$ so that I can put this into the definition of the Hamiltonian. I know the solution to this from a Wikipedia article, but the steps how to solve it are not given. Can somebody please show them to me?