Various bugfixes.

Signed-off-by: Victor Berger <victor.berger@m4x.org>
Fix runtests.py and add auth tests.

Signed-off-by: Victor Berger <victor.berger@m4x.org>