         fetch_session(conn)
         |> put_status(201)
         |> add_session(user)
-        |> json %{message: "user created"}
+        |> json %{message: "user created", user: user}
       end
 
       defp do_register({:error, message}, conn) do

        Entry point for logging users in.

        Params needs to be populated with `email` and `password`. It returns `200`
        status code along with the JSON response `{message: "logged in"}` or `400`
        with `{message: "invalid email or password"}`

       """

        fetch_session(conn)
        |> put_status(200)
        |> add_session(user)
        |> json %{message: "logged in", user: user}
      end

      defp do_login({:error, _}, conn) do
