Issue/object

Reorganized pull request:

- First commit implements a unit test to show that you cannot save the `UserCredentials` after calling `setUserRef` with the id of user object.
- Second commit add the `@ObjectId` to `UserCredentials` which fixes the issue.

May not be the best way to implement the unit test as we only need to launch mongodb and try to insert the UserCredentials.