         (if (> (length floobits-agent-buffer) position) (+ 1 position) position)))
       (floobits-listener process ""))))
 
-(defun floobits-auth ()
-  (let ((req (list
-    (cons 'username floobits-username)
-    (cons 'room floobits-room)
-    (cons 'secret floobits-secret)
-    (cons 'room_owner floobits-room-owner))))
-    (floobits-send-to-agent req 'auth)))
-
 (defun floobits-create-connection ()
   (floobits-launch-agent)
   (setq floobits-conn (open-network-stream "floobits" nil floobits-agent-host floobits-agent-port))

  (floobits-send-highlight))

(defun floobits-event-user_input (req)
  (floo-set-item 'req 'response (read-from-minibuffer (floo-get-item req 'prompt)))
  (floobits-send-to-agent req 'user_input))

(defun floobits-event-rename_buf (req)

  (interactive)
  (floobits-destroy-connection))

(defun floobits-share-dir (dir-to-share)
  "Create a room and populate it with a directory"
  (interactive "P\nGGive me a directory: ")
  (floobits-load-floorc)
  (floobits-create-connection)
  (let ((req (list
    (cons 'username floobits-username)
    (cons 'secret floobits-secret)
    (cons 'dir_to_share dir-to-share))))
    (floobits-send-to-agent req 'share_dir)))

(defun floobits-join-room (floourl)
  "Join a floobits room"
  (interactive (list (read-from-minibuffer "Floobits room URL (owner/room): " "https://floobits.com/r/")))
  (floobits-load-floorc)
  (let* ((url-struct (url-generic-parse-url floourl))
    (domain (url-host url-struct))
    (port (url-port url-struct))
