Between unstable connections and the sheer cost of expensive day passes, you might write off midair internet as not worth the trouble. But with the right tricks up your sleeve, you can finish your work without spending too long waiting for that email to load.

Get a better price

In-flight Wi-Fi is expensive…if you buy it once you’re in the air. Internet providers know you become more desperate once you’ve boarded the plane and boredom has set in, so they jack their prices way up—a typical day pass costs about $40. You can save more than 50 percent by buying a pass before your flight. Gogo, for example, which provides Wi-Fi on Delta, United, and Virgin (among other airlines), offers all-day passes on their site for $19. You can buy them anytime, and they’ll wait in your account for the next flight you take. You may save even more if you purchase the pass at the same time as your plane ticket. Take Delta: It lets you purchase Gogo passes for $16 during checkout. And if you’re a frequent flyer, don’t forget about the discounted monthly subscriptions, too. You may even be eligible for free passes through your credit card or mobile carrier. Lend Edu has a good list of credit cards that come with free Wi-Fi passes, and T-Mobile gives its customers one hour of free Gogo Wi-Fi on domestic flights. Check for travel-related perks associated with your card or phone to see what benefits are available.

Force a stubborn login page to appear

Too many times, I’ve opened my laptop in midair, connected to the Wi-Fi, and waited for a login page that never appeared. It’s supposed to pop up automatically, but sometimes your computer misbehaves and just shows you an “Unable to connect to the internet” page. If other passengers seem to be getting online, then the problem is most likely on your end. Here are a few things to try. If you’ve changed your domain name system (DNS) servers for speed or privacy reasons, try switching back to automatic DNS. Sometimes third-party servers fail to redirect you to the Wi-Fi’s login page, and changing them back to automatic has fixed the problem for me on a few occasions. Next, try clearing your cache or opening up a page in incognito mode. It’s possible your browser is using cached DNS entries to try and navigate to a page, instead of redirecting you to the Wi-Fi’s login page. In many cases, I’ve found that the Wi-Fi network’s “Gateway” IP address—that is, the IP address of the plane’s router—will redirect you to the login page. In Windows, you’ll find this address by clicking the Start menu, searching for “Command Prompt,” and running the ipconfig command. Look for “Default Gateway” under your Wi-Fi adapter, then type that number—usually something like 172.19.131.2—into your browser’s address bar. On a Mac, just hold the Option key while clicking the Wi-Fi icon in the upper right corner—you’ll find the IP address under “Router.” As a last resort, try manually navigating to the wireless provider’s home or login page. If you’ve visited that site before, it may already exist in your browser’s history. For example, the last time I had problems connecting, I typed “gogo” in my address bar, and the browser auto-suggested airborne.gogoinflight.com. I clicked that, and sure enough, the login page appeared. Bookmark this page for future reference so you don’t get stuck. If you don’t know the URL of the login page, try the provider’s home page—they’ll often let you browse their entire site without a pass. Hopefully, one of these tips will solve the problem, allowing you to connect normally again. Just don’t forget to change back your DNS service once you get home.

Make the most of a slow, intermittent connection

The hassles don’t stop once you’ve connected to the Wi-Fi. Sure, in-flight internet is a miracle of human ingenuity, but it still works remarkably slowly and often drops the connection. Some airlines have better Wi-Fi than others, but no matter how you’re flying, you can keep things running smoothly by taking a few things into consideration. First, make sure your device isn’t running any data-hogging apps in the background. When bandwidth is precious, you don’t want to waste it on making updates, syncing data to the cloud, downloading new files, or loading GIFs on Twitter. Head to your system tray or menu bar and quit any data-munching apps you don’t need. While you’re there, make sure your apps aren’t auto-updating in the background. Save that process for more reliable Wi-Fi. Cutting the fat should keep up your speed—at least somewhat—but those occasional dropouts are a bit harder to fix. I’ve found that the best solution is to enable offline features. You’d be surprised how many web apps work offline in some shape or form. So you should set that up before you leave. For example, you can configure Gmail, Google Calendar, and Google Docs to run offline so that even if your connection drops, you can keep working. You can save articles to Pocket for later offline reading, with the bonus of preventing ads and other page elements from slowing down your experience. And if you want to watch Netflix or stream music, you can download shows and playlists before you go. That way, you can save the in-flight Wi-Fi for necessity. And even if it drops, you’ll be able to get some things done. Lastly—and this has nothing to do with speed, but it’s important nonetheless—don’t forget to stay safe on public Wi-Fi. Most in-flight Wi-Fi is unencrypted, meaning your activity might be vulnerable to snoopers. Remember to use HTTPS sites and VPNs to keep your data secure.