Fixing exception when viewing challenge page while not logged in (fixes #171).

(aka 'cursor error')