Eliminate the possibility of a double render when authenticating