Cleaning up default_redirect_url code a bit