Re #1416 Fixing user ID issue, and adding session ID.