moved offline check into web.rb, to reuse in other views"