Refactor API to authenticate all requests which are not login/logout
Remove obsoleted login checks
Fix notice in ditest