begining of authentication