diff --git a/lib/pow/phoenix/templates/session_template.ex b/lib/pow/phoenix/templates/session_template.ex
index f5b13515..cca96d06 100644
--- a/lib/pow/phoenix/templates/session_template.ex
+++ b/lib/pow/phoenix/templates/session_template.ex
@@ -12,6 +12,8 @@ defmodule Pow.Phoenix.SessionTemplate do
],
button_label: "Sign in") %>
- <%%= link "Register", to: Routes.<%= Pow.Phoenix.Controller.route_helper(Pow.Phoenix.RegistrationController) %>_path(@conn, :new) %>
+ <%%= if Kernel.function_exported?(Routes, :<%= Pow.Phoenix.Controller.route_helper(Pow.Phoenix.RegistrationController) %>_path, 2) do %>
+ <%%= link "Register", to: Routes.<%= Pow.Phoenix.Controller.route_helper(Pow.Phoenix.RegistrationController) %>_path(@conn, :new) %>
+ <%% end %>
"""
end