Added start of authentication logic.