     end
   end
 
-  def new_account(account) do
-    Schema.create_changeset(account)
-    |> do_new_account()
-  end
-
-  def login_with(account = %{"email" => email, "password" => pass}) do
-    do_find_account(email: email, password: pass)
-    |> do_login
-  end
-
   def find(email) do
     case Repo.get_by(Account, email: email) do
       nil -> {:reply, {:error, Error.format_reply(:not_found, "Account with given email not found")}}
       res -> {:reply, {:ok, res}}
-    end
-  end
-
-  def get(request) do
-    case Broker.call("auth:account:verify", request.args["jwt"]) do
-      :ok -> find(request.args["email"])
-      {:error, reason} -> {:reply, {:error, reason}}
     end
   end
 

    end
  end

  defp do_new_account(changeset) do
    case Repo.insert(changeset) do
      {:ok, result} ->

        {:error, Error.format_reply(:unspecified, "oh god")}
    end
  end

  def get(request) do
    case Broker.call("auth:account:verify", request.args["jwt"]) do
      :ok -> find(request.args["email"])
      {:error, reason} -> {:reply, {:error, reason}}
    end
  end
end
