import logging
import requests
import json
import getpass

class AuthenticationError(Exception):

    """AuthenticationError"""

class CutthroatAPI(object):
    """CutthroatAPI"""
    def __init__(self, base_url="http://localhost:8888", username=None):
        self.base_url = base_url

        username = username if username else raw_input("Username: ")
        password = getpass.getpass()
        self.cookies = self._authenticate(username, password)

    def _authenticate(self, username, password):
        """Login with `username` and `password`"""
        r = requests.post(
            self.base_url + "/api/auth/login",
            data=json.dumps({
                "name": username,
                "password": password
            })
        )
        logging.info("{}\n{}".format(r, r.json()))
        return r.cookies

@@ -52,16 +52,30 @@
 etpass%0A%0A
+DEBUG = True%0A%0A
 class Au
@@ -136,16 +136,17 @@
 ror%22%22%22%0A%0A
+%0A
 class Cu
@@ -165,16 +165,17 @@
 bject):%0A
+%0A
     %22%22%22C
@@ -185,24 +185,25 @@
 hroatAPI%22%22%22%0A
+%0A
     def __in
@@ -305,16 +305,21 @@
         
+self.
 username
@@ -450,16 +450,21 @@
 nticate(
+self.
 username
@@ -776,16 +776,627 @@
       )%0A
+        if DEBUG: print(%22%7B%7D%5Cn%7B%7D%22.format(r, r.json()))%0A        return r.cookies%0A%0A    def create_room(self):%0A        name = raw_input(%22Name of the room:%22)%0A        password = raw_input(%22(Optional) Password to the room if you %22%0A                             %22wish to keep entry restricted to players who %22%0A                             %22know the password: %22)%0A        owner=self.username%0A%0A        data = dict(name=name, owner=owner)%0A        if password:%0A            data%5B%22password%22%5D = password%0A%0A        r = requests.post(%0A            self.base_url + %22/api/room/createroom%22,%0A            data=json.dumps(data)%0A        )%0A
         
@@ -1443,28 +1443,27 @@
 ))%0A        return r.
-cookies
+json()
 %0A

Add create_room to client