Fix bad rebasing conflict resolution. We need to pass the authdb here
Fix write verification before we attempt to read, or throw invalid errormessage

Discovered by Coverity
Merged pull request #327