Add in the ability to handle malformed return urls.