Issue: the index file does a deref of location to set the initial protocol which is undefined in ssr Fix: check for location 
Issue: the index file does a deref of location to set the initial protocol which is undefined in ssr
Fix: check for location