So you can try to test before authenticate if username is empty : 

```
if self.username and self.password:
    self.db.authenticate(self.username, self.password)
```

And add defaut value to username and password (see my comment in line 69)