update to login mechanism and an install script

the $_SERVER["PHP_AUTH_USER"] is not always availabe. Using
$_SERVER["REMOTE_USER"] as an alternative.

the install.pl creates the data directories and files and sets owner and
permissions