Ensure there is always a resource

Resource will be nil in the case of a an expired session. This fix will
redirect to the root_path if resource is nil, just like it'll with the
new action.