Centralized the db, added comments, improved the login and register functions, working on the email validation