title: How to implement a user login in Python with Kivy and Parse REST API
body: <p>I am trying to create a new account for a new user and have them log in successfully for an app. I am programming it in Python, using Kivy framework and Parse API for the backend. It works if I do it like the example on the Parse website when the username and password are hard coded in, however when I try to take the user's input from a text field, it is not connecting. I just don't understand how to get the user's input for username and password in there where it works.</p>
  
  <p>Below is my code in kv and in python.
  Sorry about the format...I'm not sure why it's behaving this way when I post it.</p>
  
  <h1>kv code</h1>
  
  <pre><code>&lt;SignUp&gt;:
     _username: _username
     _password: _password
     FloatLayout:
        Label:
           text: 'Create a new account'
           pos: 350, 450
           size_hint: .1, .2
           font_size: 36
        TextInput:
           id: _username
           hint_text: 'Username'
           font_size: 20
           pos: 280, 350
           size_hint: .3, .07
        TextInput:
           id: _password
           hint_text: 'Password'
           font_size: 20
           pos: 280, 300
           size_hint: .3, .07
        Button:
           text: 'Create Account'
           pos: 280, 200
           size_hint: .3, .07
           font_size: 16
           on_press: root.createUserAccount()
  </code></pre>
  
  <h1>Python code</h1>
  
  <pre><code>class SignUp(Screen):
     def __init__(self, **kwargs):
        super(SignUp, self).__init__(**kwargs)
  
  
     def createUserAccount(self):
        _username = ObjectProperty(None)
        _password = ObjectProperty(None)
  
        try:
           connection = httplib.HTTPSConnection('api.parse.com', 443)
           connection.connect()
           connection.request('POST', '/1/users', json.dumps({
              "username": self._username,
              "password": self._password,
           }), {
              "X-Parse-Application-Id": "nfgytgRuqQwkOqHxEhOEHKisT4sAxFIbCoOvbR5q",
              "X-Parse-REST-API-Key": "j9Qm7b6TuKZFiIAbONytGSWDLAAvWaie0dokk5nE",
              "Content-Type": "application/json"
           })
           result = json.loads(connection.getresponse().read())
           print result
        except:
           print "Error: Unable to connect!"
  </code></pre>