I would like to show that any element $N\in\text{SL}(2,\mathbb{R})$ can be represented in the following form \begin{align} N=\pm\exp(z)~~~~\text{ for } ~~~~~z\in\mathfrak{sl}(2,\mathbb{R}). \end{align} The Lie algebra $\mathfrak{sl}(2,\mathbb{R})$ of $\text{SL}(2,\mathbb{R})$ is that of real traceless $2\times 2$ matrices. I (for personal reasons) choose to use the basis \begin{align} \tau_1=\begin{pmatrix}0&&-1\\-1&&0\end{pmatrix},~~~\tau_2=\begin{pmatrix}1&&0\\0&&-1\end{pmatrix},~~~\tau_3=\begin{pmatrix}0&&1\\-1&&0\end{pmatrix}. \end{align} Any element $z\in\mathfrak{sl}(2,\mathbb{R})$ can then be expressed as a linear combination of these matrices; $z=z^m\tau_m$ with $z^m$ the local coordinates of $\text{SL}(2,\mathbb{R})$ and I have used the Einstein summation convention. Thus, in this basis an arbitrary $z$ is \begin{align} z=\begin{pmatrix} z_2&&z_3-z_1\\-z_1-z_3&&-z_2\end{pmatrix}. \end{align}
To compute the exponential first observe that $z^2=\omega^2 I$ where $\omega^2:=z_1^2+z_2^2-z_3^2$ and $I$ is the $2\times 2$ identity. I think we should split it into three cases where $\omega^2=0, \omega^2<0$ and $\omega^2>0$. I will only do the case $\omega^2>0$ for brevity. Computing the exponential explicitly we have \begin{align} \exp(z)&=\exp\bigg(\begin{pmatrix} z_2&&z_3-z_1\\-z_1-z_3&&-z_2\end{pmatrix}\bigg)\\ &=I+z+\frac{1}{2!}\omega^2I+\frac{1}{3!}\omega^2z+\frac{1}{4!}\omega^4I+\frac{1}{5!}\omega^4z+\cdots\\ &=\sum_{n=0}^{\infty}\frac{\omega^{2n}}{(2n)!}I+\sum_{n=0}^{\infty}\frac{\omega^{2n}}{(2n+1)!}z\\ &=\cosh(\omega)I+\frac{1}{\omega}\sinh(\omega)z\\ &=\begin{pmatrix} \cosh(\omega)+\frac{z_2}{\omega}\sinh(\omega)&&\frac{z_3-z_1}{\omega}\sinh(\omega)\\\\-\frac{z_3+z_1}{\omega}\sinh(\omega)&&\cosh(\omega)-\frac{z_2}{\omega}\sinh(\omega)\end{pmatrix}\tag{1}. \end{align} Now I need to show that any $N$ can be written as $\pm(1)$ but I am not sure how to do this part. I thought I could try and write \begin{align} N=\begin{pmatrix} a&&b\\c&&d\end{pmatrix} ,~~~~ ad-bc=1 \end{align} and solve the resulting system of equations but I don't think this is how it is done.
If $A\in\mathfrak{sl}_2(\Bbb R)$ and $B\in\text{GL}_2(\Bbb R)$ then $B^{-1}AB\in\mathfrak{sl}_2(\Bbb R)$ and $\exp(B^{-1}AB)=B^{-1}\exp(A)B$. Therefore, if the conclusion is true for some $N$ then it is true for all $N'$ conjugate to $N$.
If $N$ has two distinct real eigenvalues, then it is conjugate to $$\pm\pmatrix{a&0\\0&a^{-1}}=\pm\exp\pmatrix{\ln a&0\\0&-\ln a}$$ for some $a>0$.
If $N$ has non-real eigenvalues, then it is conjugate to $$\pmatrix{\cos t&-\sin t\\\sin t&\cos t}=\exp\pmatrix{0&-t\\t&0}.$$
If $N$ has two equal real eigenvalues then either it is $\pm I=\pm\exp(O)$ or is conjugate to $$\pm\pmatrix{1&1\\0&1}=\pm\exp\pmatrix{0&1\\0&0}.$$