fix basic auth, add option to truncate text