small cleanup + almost working authentification