Longer prison sentences for security threats