     |> put_status(201)
     |> create_session(user)
 
-    {conn, %{message: "user created", user: user}}
+    {conn, %{message: "user created", user: sanitize_user(user)}}
   end
 
   def register({:error, message}, conn) do

    |> put_session(:current_user, user)
  end

end
    conn = fetch_session(conn)
    |> put_status(200)
    |> create_session(user)
    {conn, %{message: "logged in", user: sanitize_user(user)}}
  end

  def login({:error, _}, conn) do
