Added log out functionality. Fixed intermittent counter bug.

Fixed the bug where counter values would randomly not appear.
Merge branch 'Log-Out-&-Bug-Fixes'