Fix issue where login and logout links could send viewers to unsafe pages

Github

Github
platform
Fixes an issue where a crafted link could send viewers to an outside site or run harmful code after they log in or out. Viewers are now only taken back to pages on the same platform, and normal returns to the page they were on keep working.