It's a cracked client? Well, that's most likely the reason. Cracked clients means you don't have premium and you have to join CRACKED servers. Which are OFFLINE servers.
If you don't get "bad login", then that just means the packets you're sending to servers are being turned away, or your network isn't working correctly.
A cracked server isn't offline, it just means it doesn't bother to authenticate with minecraft.net's session servers.
Usually you can fix it (If it's a singeplayer game) if you keep tryin to connect either that or redownload your game.
Your firewall may possibly be refusing to send out or recieve the packets needed to connect