implemented UIDs for sessions, changed templates and schema accordingly