Fix doAuth flow
Add example script and NedbAdapter