old_contents: import core
  
  class Dummy(core.User):
      def _register(self, password):
          return self.__setitem__("password", password)
  
      def _authenticate(self, password):
          if self.__getitem__("password").decode() != password or password is None:
              raise core.FailedToAuthenticate(self.__getitem__("password") + " vs " + password)
  
new_contents: import core
  
  class Dummy(core.User):
      def _register(self, password):
          return self.__setitem__("password", password)
  
      def _authenticate(self, password):
          if password is None:
              raise core.FailedToAuthenticate("Password for user %s can't be empty" \
                      % self.username)
  
          if self.__getitem__("password").decode() != password or password is None:
              raise core.FailedToAuthenticate("Failed to authenticate user %s" % \
                      self.username)
  
subject: Add empty password error message