added conditional to jade template to prevent crashing by flash message