Habeeb Khan admitted a charge under the Online Safety Act after holding an imitation AK-47 and making threats towards the English Defence League.