document.getElementById("timer").innerHTML = timeLeft;
}
} else {
- if (timeLeft < last || last == -1) {
+ if ((timeLeft < last && timeLeft > 0) || last == -1) {
last = timeLeft;
console.log('Session valid < ' + timeLeft);
timeLeft = '< ' + timeLeft + ' min';