Python, How do I validate login credentials saved in mysql?

I am trying to make a application with (kivy, python and mysql). My script should run and grab the login and password to verify what the user put into the areas. I have done this in PHP but I just can't wrap my head around writing it in python. I am still fairly new to the python language and I am converting from PHP. If the login is correct it will slide to the next screen and say logout, if not it will just wipe the text that was entered. It deletes the text I assume because it can't grab the right info or verify it in the script.

from kivy.app import App
from kivy.properties import StringProperty
import os
from kivy.uix.screenmanager import ScreenManager, Screen, SlideTransition
from connected import Connected
import pymysql.cursors

conn = pymysql.connect(host='',
                       user='',
                       password='',
                       db='',
                       cursorclass=)


class Login(Screen):
    def do_login(self, loginText, passwordText):
        app = App.get_running_app()

        app.username = loginText
        app.password = passwordText
        with conn.cursor() as cursor:
            sql = "SELECT * FROM login WHERE username = %s && password = %s"
            cursor.execute(sql, (app.username, app.password))
            if app.username == cursor.execute and app.password == cursor.execute:
                self.manager.transition = SlideTransition(direction="left")
                self.manager.current = 'connected'

                app.config.read(app.get_application_config())
                app.config.write()

        else:
            self.manager.transition = SlideTransition(direction="right")
            self.manager.current = 'login'
            self.manager.get_screen('login').resetForm()

    def resetForm(self):
        self.ids['login'].text = ""
        self.ids['password'].text = ""


class LoginApp(App):
    username = StringProperty(None)
    password = StringProperty(None)

    def build(self):
        manager = ScreenManager()

        manager.add_widget(Login(name='login'))
        manager.add_widget(Connected(name='connected'))

         return manager

    def get_application_config(self):
        if not self.username:
            return super(LoginApp, self).get_application_config()

        conf_directory = self.user_data_dir + '/' + self.username

        if not os.path.exists(conf_directory):
            os.makedirs(conf_directory)

        return super(LoginApp, self).get_application_config(
            '%s/config.cfg' % conf_directory
    )


if __name__ == '__main__':
    LoginApp().run()