Cleaning up markup and fixing an issue with login_page redirects