Fix to for logging switch on browsers having localStorage set to null 

applies to e.g. Midori browser on RPi.

Jira-issue: WP-1286
Merge pull request #77 from mlasak/patch-1

Fix to for logging switch on browsers having localStorage set to null