ActionController::ActionControllerError: Cannot redirect to nil!

fail to logout if referer is nil