“Employees or former employees publishing unauthorized messages on official accounts could be prosecuted under the U.S. Computer Fraud and Abuse Act, which prohibits someone from exceeding authorized access to computers. ‘The argument would be that the authorization to use the account was only for employees and implicitly that was extinguished when the employee left government employment,’ said Orin Kerr, a law professor at George Washington University.”
Source: Rogue tweeters in government could be prosecuted as hackers – The Washington Post