Work in progress.

Fixed loading of stylesheet, auto-login a user that has some
predefined scenarios, minor cleanups.
Changed listScenarios and getScenario operations to return an NCName instead of a numeric identifier for the id.

Related changes to manage the id are included. Also included some
other misc. cleanups.