Fix errors when user not logged in.
Merge pull request #113 from paulld/fix_bugs_before_deploy

Fix errors when user not logged in.