Fix errors when application is not authorized.
Fix errors when application is not authorized.

Handling of undefined session variables and some leftovers from code refactoring.

mdreier/hero-labs-display