Restructuring for sessions and device tokens