Fix bug 1047018: Track successful log in/out

```
('localStorage' in win) && (function() {
```