added references functionality, set permissions on documents to be restricted to only users