corrected localStorage clear if data if back end server is down
setting up for karma and jasmine testing