Fixed possible race condition with time functions in

authenticationHeaders