updated configurations

Moved global variables to the top of the file.
Added logging settings.
Added array for public_cut_data (to cut some fields from public JSON if
the profile is private).
Fixed problems with fetching site salt via API.
removed left-over variable
improved JSON API

Moved public data cut to functions.php, where it generates the files
now.
Added proper private key file system.
a lot of changes and improvements

Re-added confirm_access (I deleted it accidentally).
Added last_activity to the system.
Moved JSON API user file generation to functions.php, improved the
generation process.
Added logging function.
Added logging to most of the features.
If the system is called by an API, the logged_in status is not checked.
updated database