Refactor the auth to make it connection wise

[fixes #212]
[related mongoid/mongoid#3382]