Revamped Login

added login page
improved the database code, see settings.js