Added login for the web interface based on github://panique/php-login simple login script. Made a few other tweaks.