Password protect whole staging site. Redirect to original page not working
{% requireLogin %} is intended for use with your own login form on the frontend rather than the standard /admin one. From the docs for loginPath:


  The URI Craft should use for user login on the front-end.


Which means you create your own frontend login form, and set that as the loginPath. As you don't have that, it's defaulting to the default login instead, which redirects users to the admin dashboard instead of the page they were on.