Security enhancements and bugfixes

Mostly related to authentification and similar.