Added error message for invalid sessions