You should use a [`before_filter`](http://guides.rubyonrails.org/action_controller_overview.html#filters) to check that you have a logged in user, if not you should redirect with messaging that you need be logged in to log out.