When I log on after my wife I have to repair the library and vice versa . Please help.
If you access a Photos Library and edit photos, you are changing the ownership of some files inside the Photos library. Whoever accesses the library will change the access rights and ownership of files. Repairing the library will make it possible again to work with the library from a different user account.
For iPhoto Libraries it helped to move the library to an external drive and to enable the flag "Ignore Ownership" for this drive. Have you tried this? It needs to be a locally mounted external drive or a separate disk partition, because you cannot enable "Ignore Ownership" on your system drive.
See this link: iPhoto: Sharing libraries among multiple users