[FIX] Prevent initial fetch before logging in

Declare your vars at top of fn block:
```
var newIds, diffIds;

//...