After surfing the web about cookies and session I am creating a simple login in nodejs using express with cookie/session using redis as my data storage. 

What do you think is the best way to handle cookies/session after the user logs in? I also have these question in my mind:

1. How do i prevent using userA cookie to inject to userB's browser?
2. Do I need to check the value of the cookies before performing any process?
3. Using `cookieParser` is it safe that the connect.sid is unique in every browser?
4. `app.use(session({secret: 'secretkey', key: 'quser'}));` what is this `secret` all about?

I can't make up my mind on how i'm gonna use them in a proper way. Thanks guys.
['https://Stackoverflow.com/questions/24232234', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2717352/']
A common pattern is to create a QObject-derived class and make `connect_client` a slot in that class. Connect statement will look like `...clicked.connect(my_object.connect_client)`. In this case you can store any data in the object (e.g. `self.abapclient = abapclient`) and use it later when you like. 

`main` will have access to the object and therefore its properties and methods. However this is no use for you because main will always be busy executing `app.exec_()`. At the time `connect_client` is called, you can no longer perform any actions in `main`. Basically, all work should be done in slots, and it's convenient to put slots in a class so they can store a program state in object properties and share access to it.
You could pass the object as argument to the slot. Just give the class of object that is sent to connected slots as part of the `pyqtSignal`, like `pyqtSignal(YourClass)`. More details are provided in @HansHermans answer at [PyQt signal with arguments of arbitrary type / PyQt\_PyObject equivalent for new-style signals](https://stackoverflow.com/questions/4523006/pyqt-signal-with-arguments-of-arbitrary-type-pyqt-pyobject-equivalent-for-new).