backend: Username based AD authentication, improved cookie based session handling, rewrite of callbacks to promises, other improvements.