corrected timer function when logged out