Db interaction and Messages. Contains fixes.

Modified: db interaction modified to allow admin to grant/revoke area permissions to users

Modified: messages