better timing for authenticating