added an offline mode env var switch for bypass authentication
added crude support for posibility of multi user system, although assumes one at present
tidied up switching of authentication mechanism based on online/offline status
Changed process of getting context engine for a user by creating on demand