Some improvements on sessions endpoint