How is the Lagrangian defined in GR? 
*

*Reading about the Schwarzschild metric in general relativity I see that sometimes $$L=g_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}$$ and sometimes  $$L=\sqrt{g_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}}.$$
Which is the right way?

*Also how is the energy $E$ defined as $$E=-\frac{\partial{L}}{\partial{\dot{t}}}=\left(1-\frac{2M}{r}\right)\dot{t}~?$$
Because $E$ here doesn't have units of energy. Am I missing something here?
 A: The correct way is to define the reparametrization-invariant action
$$ S[X] = \int d\tau \sqrt{g_{\mu \nu} (X(\tau)) \cdot \frac{dX^{\mu}}{d\tau} \frac{dX^{\nu}}{d\tau} }. $$
Note that the choice of $\tau$ is arbitrary. The system has a large group of gauge symmetries - those are reparametrizations of the worldline (different choices of $\tau$).
One way to deal with this is to gauge-fix the system. For example, we can choose to set $\tau$ to be a proper time along the geodesic (induced by the metric):
$$ d\tau = \sqrt{g_{\mu \nu} (X(\tau)) dX^{\mu} dX^{\nu}}. $$
But this immediately implies that the square root in the action is constrained to be equal to $1$. This is why it is convinient to drop the square root ($\sqrt{1} = 1$, right?) and write
$$ L = g_{\mu \nu} (X(\tau)) \cdot \frac{dX^{\mu}}{d\tau} \frac{dX^{\nu}}{d\tau}. $$
But this only works if $\tau$ is the proper time.
Also, you should multiply the Lagrangian by the overall factor of $m$. This will restore the units of energy.
