Reliable authentication

fixes #50 #54 

This will break backward compatibility with existing plugins.
New interface are promoted with those changes.