Bug fix: check that the deposit belongs to the current user and throw
appropriate exception if this is not the case.