Added "offline" and impersonation modes
Merge branch 'master' into local
Fixed some bugs in dev mode