@Aemyl is correct. Your problem is orphaned instances of Tk.

**EDIT:** I'm just using `tk.Tk()` here but the solution should be the same. Just use the `ctk` equivalents.
1. First you instantiate Tk here: `self.window = tk.Tk()`
2. Then you do this in `submit`:
```
self.window.withdraw() # hides the window
self.window.quit() # exits the mainloop, but the instance is still live
print(self.entrypassword.get()) # add this line and you can see that the widgets are still accessible
```
3. Then in `show_main_window` you start another instance of Tk: `window = tk.Tk()`
4. In `logout`, you correctly kill the new instance: `self.master.destory`
5. Then you create a new instance of `LoginWindow`, which starts another instance of Tk. But the old instance is still there, orphaned, because you never killed it. You just exited the mainloop.
### Solution 1 - You actually want new instances
Easy fix. Just replace
```
self.window.withdraw()
self.window.quit()
```
with
```
self.window.destroy() # no more orphaned instance
```
### Solution 2 - You want to reuse the first instance
1. Replace
```
self.window.withdraw()
self.window.quit()
```
with
```
self.window.withdraw()
self.user_input.set('') # clear the Entry
```
2. Use `Toplevel` in `show_main_window`:
- Replace `window = tk.Tk()` with `window = tk.Toplevel()`
- Remove this line: `window.mainloop()`
3. In `logout`, replace
```
login = LoginWindow()
login.run()
```
with
```
self.master.master.deiconify()
```
4. You'll need to handle closing the second window without invoking `logout`, though, or you'll still have that hidden window hanging around if you close with the `[X]` button. Add this line just after creating the Toplevel window (in `show_main_window`:
```
window.protocol('WM_DELETE_WINDOW', self.exit)
```