Yes, there is an online Sonic game you can enjoy called Sonic 2 Online, available at www.sonic2online.com.
Visit the site and download the game client. Once the download finishes, double-click the application file (ELIS.exe) to launch it. After that, you will be able to jump straight into the game and play as your favorite blue hedgehog online.