reorganize server; add server-side guest support

* introduction of AccountManager and util files
* minor changes in database and admin