codeSnippet almost with cat
when it works, beginning of autheticate