Fixed reauthentication bug