       "Welcome Back!"
 
   """
-  def get(conn), do: conn.private[:phoenix_messages]
+  def get(conn), do: get_session(conn, :phoenix_messages) || %{}
   def get(conn, key) do
-    get_in conn.private[:phoenix_messages], [key]
+    get_in get(conn), [key]
   end
 
   @doc """

  """
  def clear(conn), do: persist(conn, %{})

  defp persist(conn) do
    persist(conn, get(conn))
  end
  defp persist(conn, messages) do
    conn = assign_private(conn, :phoenix_messages, messages)
    put_session(conn, :phoenix_messages, conn.private[:phoenix_messages])
  end
end


  Clears the Message dict on new requests
  """
  def call(conn = %Conn{private: %{plug_session: _session}}, _) do
    register_before_send conn, fn
      conn = %Conn{status: stat} when stat in @http_redir_range -> conn
      conn -> clear(conn)
