added authentification and tests