added authentification function