Makes sure we correctly create the url for the email to be sent out.

Building the URL in the template resulted in // appearing at the start of the
url and pushing the user to the wrong login page.