refactored configuration loading code in nodeInit
now it's extracted to separate function and loads earlier
Introduced localFsMode configuration variable to support SPA mode when working in Phonegap environment. Made some adaptations according to that setting:
* customized base URL in several places
* introduced Cookie emulator
* fixed login routing
* made lots of refactoring in client-side router