logging added
testMode added since localStorage doesn't work with phantomjs