add tests for the abilites relating to the borrower
refactor tests
set rights on borrowers
remove deprecated code
fix tests for authentication