Fixed some whacky and complex logic, and fixed a bug that was comparing two timestamps using a number compare but one timestamp was in miliseconds, and the other was in seconds.
Fixed some whacky and complex logic, and fixed a bug that was comparing two
timestamps using a number compare but one timestamp was in miliseconds, and
the other was in seconds.

kalabox/kalabox-app-pantheon,kalabox/kalabox-app-pantheon,ManatiCR/kalabox-app-pantheon,gremy/kalabox-app-pantheon,gremy/kalabox-app-pantheon,gremy/kalabox-app-pantheon,ManatiCR/kalabox-app-pantheon,gremy/kalabox-app-pantheon,kalabox/kalabox-app-pantheon,ManatiCR/kalabox-app-pantheon,ManatiCR/kalabox-app-pantheon