Created the database and log-in functions.