Validating redirects and forwards

Improving security in BugTracker by validating url redirects from the login page and highlighting any external links.
Maybe check the protocol too? This would allow for being referred to a non-ssl site from an ssl site. Perhaps not a likely attack vector but possible. Going to the non-ssl version of the site would still send authentication cookies allowing a snooper to intercept the cookie.