diff --git a/basic_webmail.module b/basic_webmail.module
index ad5e2b5..b741ea7 100644
--- a/basic_webmail.module
+++ b/basic_webmail.module
@@ -55,62 +55,66 @@ function basic_webmail_menu() {
     'description'      => 'Configure the mail server.',
   );
 
-  global $user;
-  if ($user->uid) {
-    // The main mail listing page.
-    $items['basic_webmail'] = array(
-      'title'            => 'E-mail',
-      'page callback'    => 'basic_webmail_mail_list',
-      'description'      => 'Send and/or receive e-mail.',
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_NORMAL_ITEM,
-    );
-    // The message view page.
-    $items['basic_webmail/message'] = array(
-      'page callback'    => '_basic_webmail_message',
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK,
-    );
-    // The compose message page.
-    $items['basic_webmail/sendmail'] = array(
-      'page callback'    => 'drupal_get_form',
-      'page arguments'   => array('_basic_webmail_send_mail_form'),
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK,
-    );
-    // The delete message confirmation page.
-    $items['basic_webmail/delete'] = array(
-      'page callback'    => 'drupal_get_form',
-      'page arguments'   => array('_basic_webmail_delete_message_form'),
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK,
-    );
-    // The copy message page.
-    $items['basic_webmail/copy'] = array(
-      'page callback'    => 'drupal_get_form',
-      'page arguments'   => array('_basic_webmail_copy_message_form'),
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK,
-    );
-    // The move message page.
-    $items['basic_webmail/move'] = array(
-      'page callback'    => 'drupal_get_form',
-      'page arguments'   => array('_basic_webmail_move_message_form'),
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK,
-    );
-    // Show e-mail matches when filling in the forms.
-    $items['basic_webmail/autocomplete'] = array(
-      'title'            => 'Basic webmail autocomplete',
-      'page callback'    => 'basic_webmail_autocomplete',
-      'access arguments' => array('access basic_webmail'),
-      'type'             => MENU_CALLBACK
-    );
-  }
+  // The main mail listing page.
+  $items['basic_webmail'] = array(
+    'title'            => 'E-mail',
+    'page callback'    => 'basic_webmail_mail_list',
+    'description'      => 'Send and/or receive e-mail.',
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_NORMAL_ITEM,
+  );
+  // The message view page.
+  $items['basic_webmail/message'] = array(
+    'page callback'    => '_basic_webmail_message',
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK,
+  );
+  // The compose message page.
+  $items['basic_webmail/sendmail'] = array(
+    'page callback'    => 'drupal_get_form',
+    'page arguments'   => array('_basic_webmail_send_mail_form'),
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK,
+  );
+  // The delete message confirmation page.
+  $items['basic_webmail/delete'] = array(
+    'page callback'    => 'drupal_get_form',
+    'page arguments'   => array('_basic_webmail_delete_message_form'),
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK,
+  );
+  // The copy message page.
+  $items['basic_webmail/copy'] = array(
+    'page callback'    => 'drupal_get_form',
+    'page arguments'   => array('_basic_webmail_copy_message_form'),
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK,
+  );
+  // The move message page.
+  $items['basic_webmail/move'] = array(
+    'page callback'    => 'drupal_get_form',
+    'page arguments'   => array('_basic_webmail_move_message_form'),
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK,
+  );
+  // Show e-mail matches when filling in the forms.
+  $items['basic_webmail/autocomplete'] = array(
+    'title'            => 'Basic webmail autocomplete',
+    'page callback'    => 'basic_webmail_autocomplete',
+    'access callback' => '_basic_webmail_menu_access',
+    'type'             => MENU_CALLBACK
+  );
 
   return $items;
 }  //  End of basic_webmail_menu().
 
+/**
+ * Access callback for webmail's menu items.
+ */
+function _basic_webmail_menu_access() {
+  global $user;
+  return $user->uid && user_access('access basic_webmail');
+}
 
 /**
  * Implementation of hook_user().
