anchor.diff:    (string= (password-hash account)
              (hash-password input)))
   
  -(defun create-account (client username)
  -  (format client "~&Let's create your account!~%")
  -  (format client "~&Use ~A as your username? (Y/n) " username)
  -  (setf (input-handler client)
  -        (let ((state :use-username?)
  -              (email nil)
  -              (password nil))
  -          (lambda (input &aux (input (string-cleanup input)))
  -            (ecase state
  -              (:use-username?
  -               (if (string-equal "n" input)
  -                   (progn
  -                     (format client "~&Pick a new username: ")
  -                     (setf state :pick-username))
  -                   (progn
  -                     (format client "~&Using ~A as your username.~%" username)
  -                     (format client "~&Please enter your email address: ")
  -                     (setf state :email))))
  -              (:pick-username
  -               (format client "~&Use ~A as your username? (Y/n) " input)
  -               (setf username input
  -                     state :use-username?))
  -              (:email
  -               (format client "~&You entered ~A as your email address. Is this correct? (Y/n) " input)
  -               (setf email input
  -                     state :email-confirm))
  -              (:email-confirm
  -               (if (string-equal "n" input)
  -                   (progn
  -                     (format client "~&Please enter your email address: ")
  -                     (setf state :email))
  -                   (progn
  -                     (format client "~&Pick a password: ")
  -                     (setf state :password))))
  -              (:password
  -               (setf password input)
  -               (format client "~&Confirm your password: ")
  -               (setf state :password-confirm))
  -              (:password-confirm
  -               (if (string= password input)
  -                   (progn
  -                     (make-instance 'account :username username :password password :email email)
  -                     (format client "~&Account successfully created~%")
  -                     (login client))
  -                   (progn
  -                     (format client "~&Passwords did not match.~%")
  -                     (format client "~&Pick a password: ")
  -                     (setf state :password)))))))))
  +(defun/cc maybe-login (client)
  +  (let* ((username (prompt-client client "~&Username: "))
  +         (account (find-account username)))
  +    (if account
  +        (login client account)
  +        (no-such-account client username))))
  +
  +(defun/cc login (client account)
  +  (let ((account (confirm-password account (prompt-client client "~&Password: "))))
  +    (if account
  +        (progn
  +          (setf (soul client) (make-instance 'soul :account account :client client))
  +          #+nil(format client "~&You are now logged in as ~A.~%" (username (account (soul client))))
  +          (format client "~&Commands: 'look' and 'quit'. Type anything else to chat.~%")
  +          #+nil(broadcast-to-room client "~&~A enters the world.~%" (username (account (soul client)))))
  +        (progn
  +          (format client "~&Wrong password.~%")
  +          (maybe-login client)))))
  +
  +(defun/cc no-such-account (client username)
  +  (if (client-y-or-n-p client "~&No such account. Create one? (Y/n) ")
  +      (create-account client username)
  +      (progn
  +        #+nil(format client "~&Bye!~%")
  +        (close client))))
  +
  +(defun/cc create-account (client username)
  +  (let* ((username (pick-username client username))
  +         (password (pick-password client))
  +         (email (pick-email client)))
  +    (make-instance 'account :username username :password password :email email)
  +    (format client "~&Account successfully created~%")
  +    (maybe-login client)))
  +
  +(defun/cc pick-username (client username)
  +  (if (client-y-or-n-p client "~&Use ~A as your username? (Y/n) " username)
  +      username
  +      (pick-username client (prompt-client client "~&Pick a new username: "))))
  +
  +(defun/cc pick-password (client)
  +  (let* ((password (prompt-client client "~&Pick a password: "))
  +         (confirm (prompt-client client "~&Confirm your password: ")))
  +    (if (string= password confirm)
  +        password
  +        (progn
  +          (format client "~&Passwords did not match.~%")
  +          (maybe-login client)))))
  +
  +(defun/cc pick-email (client)
  +  (prompt-client client "~&Please enter your email address: "))
   
   (defun play-game (client)
  -  (format client "~&Commands: 'look' and 'quit'. Type anything else to chat.~%")
  -  (broadcast-to-room client "~&~A enters the world.~%" (username (account (soul client))))
  -  (setf (input-handler client)
  -        (lambda (input)
  -          (handle-player-command (soul client) input))))
  +  (handle-player-command (soul client) (last-input client)))
  +
  +(setf *default-client-main* #'play-game)
  
positive.code: 
  (defmethod init ((client tcp-client))
    (format client "~&Hello. Welcome to Sykosomatic.~%")
    (login client))
  
  (defmethod update ((client tcp-client))
    nil)
  
  (defmethod teardown ((client tcp-client))
    (close client :abort t)
  
negative.code: ;;;
  (defparameter *server-listen-ip* iolib:+ipv4-unspecified+)
  (defparameter *server-port* 4000)
  (defparameter *default-client-main* nil)
  
  ;;;
  ;;; TCP Clients
  ;;;
  (defclass tcp-client (client fundamental-character-output-stream
                               fundamental-character-input-stream)
    (#+nil(input-handler :initarg :input-handler :initform nil :accessor input-handler)
     (socket :accessor socket :initarg :socket
             :initform (error "Must provide a socket for this client."))
     (remote-name :accessor remote-name)
  