Split read-only logic into three functions: read_only, logged_in, and login_available. Move display logic from javascript into templates.
Split read-only logic into three functions: read_only, logged_in, and login_available. Move display logic from javascript into templates.