Here are the changes:
Moved your ScreenManager to kv, The name attribute is for the instance, not the class.
Interesting 'feature' The kv code would now work correctly with the names you gave the screens. The python convention is to give classes CamelCaseNames. I changed your screen names to CamelCase, ie from mainWIndow to MainWindow and things worked as expected. I also removed most of the code from your python file, as it was not necessary. Files attached.
see the bottom of the kv file:
BoxLayout:
ScreenManager:
MainWindow:
name: 'main'
SecondWindow:
name: 'second'