Why can I only play offline in Minecraft?
When I start-up my launcher it only gives me an option to play offline. When I try to connect to any servers afterwards it gives me an error saying Bad Login
or Could not resolve...
.
If you are getting Bad Login
the Mojang servers might be down. You can always check this on https://help.mojang.com.
For the second error, check if your internet connection is actually up and running. Try to connect to a basic website (like this one).
If you think this is a bug you can also always report a bug on https://mojang.atlassian.net/browse/MC. Be sure to be very clear and specific about your issue.
Of course we're all upstanding citizens that would never dream of account-sharing, but I do think it's worth mentioning that you cannot have one minecraft account logged into multiple machines at once. So if, for example, you were to log in on your PC, then wander away from the game and forget about it (I don't recommend this), then try to log in to play on another computer, it will give you a Bad Login error.
If you've verified that the Mojang servers are up, your internet connection is active, your account isn't already logged in anywhere, you're certain that you're entering your username and password correctly, and you've tried restarting the launcher (I don't know why this works but sometimes it does), reinstalling Minecraft may be your best option. Back up your saves.