add storage flag for location/session switch

This changed default storage location to sessionStorage. config can be used to specify locationStorage if needed.