Wow, this sounds eerily similar to something I got in trouble for back in middle school. A fellow student saved his email password in the browser on our class's shared computer, so I changed his profile picture and deleted the saved password. For a while no one knew who had done it, and it was basically a non-issue, but after I bragged to an acquaintance and he ratted me out, the student whose account I'd tampered with went apeshit. Eventually, after a couple tearful meetings with the heads of school, I had to write a paper about penalties for "impersonating" someone online in Texas. I still think the brouhaha and ensuing punishment were bullshit, although I regret not just telling the other kid not to save his information so publicly.
I think "write a paper" is an entirely appropriate response for hijinks. "We'll show you, you little malcontent! Have more education!" It also likely taught you the important lesson about never bragging about malfeasance. I also think that this is exactly the sort of flier the ACLU needs to take to pick back a little at Hazelwood v Kuhlmeier. "Felony hacking" for reading a teacher's password is pretty much the proportionality doctrine in a nutshell.
Yeah, it's become my school's stock response to shenanigans, and it's kinda hilarious. One of my friends "stole a taco" (it was sitting, unmarked, on a table in the hallway; he ate it) and after he refused to apologize they made him write a paper about the value of respect. Hazelwood v Kuhlmeier is one of my least favorite SCOTUS cases of the last century. I wish the ACLU would fight it with something like this.