Fix session timeout to work with Rails cookie store

Rails cookie-based default session store represents times as Strings, which must be converted to times before comparison.