[WIP] Use http_referer for post registration/login redirect

This will fix the following scenario

1. User is on an article page
2. User starts registration process
3. User views privacy policy
4. User finishes registration process
5. User expected to go back to article page but went to privacy policy