Reworked db model system and implement new features for chat
Basic Account Manager implementation

Works on server side, issues with displaying on client side (looks like
jQueary is not triggering isReady for $( function ....) ). Needs to
rework displaing form.

(cherry picked from commit 4117d77a26f76032d99c48c5c9cd03290bd55d6a)