error using block if session has expired