Added a check for already existing user in registration phase. Also changed the database retrieval so that all Handlers whose parent class is BaseHandler can now retrieve the database connection by 'self.db', since the BaseHandler has a method property called db now.