add login validation to library and addcontent