Handle invalid sessions #2220