Is there a way to programmatically differentiate between multiple logins for the same user in the app?

I want to programmatically differentiate between multiple sessions / logins for the same user across multiple devices.

Is this possible?

You can programmatically find sessions for a particular user across devices using the Backend API - specifically, Managing App Users and Sessions. Navigate to the "Get single user" section and you can find an example of identifying the sessions for a particular user. The sessions can be differentiated by their id field that is returned from the API.