Fix for writing sessions - changed session item from full fledged item to an itemid and visibility
Passing visibility to layer card
Setting visibility before adding layer to map
retain layer visibility for share