class SessionsController < Devise::SessionsController

  def destroy
    current_user.is_logged_in = false
    super
  end
end
class SessionsController < Devise::SessionsController

  def destroy
    current_user.is_logged_in = false if current_user
    super
  end
end
Make sure we have a valid session before trying to log the user out.
Make sure we have a valid session before trying to log the user out.
