title: Angularjs how to get URL referrer?
body: <p>In AngularJS, I have a login controller that is redirected to by every single page in the app if the user arrives at the page and is not logged in. After the login sequence, I would like to redirect the user back to the page that they came from. What's the best way to do this?</p>