Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 214)
+++ src/mlx/gui/flight.py	(revision 215)
@@ -260,4 +260,8 @@
         table.attach(self._entranceExam, 1, 2, 3, 4, ypadding = 12)
 
+        self.addButton(xstr("button_offline"),
+                       clicked = self._offlineClicked,
+                       tooltip = xstr("button_offline_tooltip"))
+
         self._loginButton = self.addButton(xstr("button_login"), default = True)
         self._loginButton.connect("clicked", self._loginClicked)
@@ -270,4 +274,9 @@
         return self._entranceExam.get_active() and \
                self._pilotID.get_text()!=""
+
+    @property
+    def pilotID(self):
+        """Get the pilot ID, if given."""
+        return self._pilotID.get_text()
 
     def activate(self):
@@ -301,4 +310,8 @@
         self._loginButton.set_sensitive(pilotID!="" and
                                         (password!="" or entranceExam))
+
+    def _offlineClicked(self, button):
+        """Called when the offline button was clicked."""
+        self._wizard.nextPage()
 
     def _loginClicked(self, button):
@@ -414,6 +427,7 @@
         self._flights = []
         self._listStore.clear()
-        for flight in self._wizard.loginResult.flights:
-            self._addFlight(flight)
+        if self._wizard.loggedIn:
+            for flight in self._wizard.loginResult.flights:
+                self._addFlight(flight)
 
     def _addFlight(self, flight):
@@ -525,5 +539,5 @@
         flight = self._wizard._bookedFlight
         if self._wizard.gui.config.onlineGateSystem and \
-           not self._wizard.entranceExam:
+           self._wizard.loggedIn and not self._wizard.entranceExam:
             if flight.departureICAO=="LHBP":
                 self._wizard.getFleet(self._fleetRetrieved)
@@ -2221,5 +2235,5 @@
         """Called when the forward button is clicked."""
         if self._wizard.gui.config.onlineGateSystem and \
-           not self._completed and \
+           self._wizard.loggedIn and not self._completed and \
            self._wizard.bookedFlight.arrivalICAO=="LHBP" and \
            not self._wizard.entranceExam:
@@ -2433,8 +2447,9 @@
 
         self._flightType.set_active(-1)
-        self._onlineFlight.set_active(True)
+        self._onlineFlight.set_active(self._wizard.loggedIn)
 
         self._gatesModel.clear()
         if self._wizard.gui.config.onlineGateSystem and \
+           self._wizard.loggedIn and \
            self._wizard.bookedFlight.arrivalICAO=="LHBP" and \
            not self._wizard.entranceExam:
@@ -2497,8 +2512,9 @@
         bookedFlight = gui.bookedFlight
         tm = time.gmtime()
-        
-        fileName = "%s %s %02d%02d %s-%s.pirep" % \
-                   (gui.loginResult.pilotID,
-                    str(bookedFlight.departureTime.date()),
+
+        pilotID = self._wizard.pilotID
+        if pilotID: pilotID += " "
+        fileName = "%s%s %02d%02d %s-%s.pirep" % \
+                   (pilotID, str(bookedFlight.departureTime.date()),
                     tm.tm_hour, tm.tm_min,
                     bookedFlight.departureICAO,
@@ -2584,5 +2600,5 @@
         self._pirepSent = returned and result.success
         if self._wizard.gui.config.onlineGateSystem and \
-           not self._wizard.entranceExam and \
+           self._wizard.loggedIn and not self._wizard.entranceExam and \
            returned and result.success:
             bookedFlight = self._wizard.bookedFlight
@@ -2660,7 +2676,17 @@
 
     @property
+    def pilotID(self):
+        """Get the pilot ID, if given."""
+        return self._loginPage.pilotID
+
+    @property
     def entranceExam(self):
         """Get whether an entrance exam is about to be taken."""
         return self._loginPage.entranceExam
+
+    @property
+    def loggedIn(self):
+        """Indicate if there was a successful login."""
+        return self._loginResult is not None
         
     @property
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 208)
+++ src/mlx/gui/gui.py	(revision 215)
@@ -186,4 +186,9 @@
         """Get whether an entrance exam is about to be taken."""
         return self._wizard.entranceExam
+
+    @property
+    def loggedIn(self):
+        """Indicate if the user has logged in properly."""
+        return self._wizard.loggedIn
         
     @property
@@ -432,5 +437,8 @@
         self._logView.get_buffer().set_text("")
 
-        self._wizard.reloadFlights(self._handleReloadResult)
+        if self.loggedIn:
+            self._wizard.reloadFlights(self._handleReloadResult)
+        else:
+            self._wizard.reset(None)
 
     def _handleReloadResult(self, returned, result):
