diff --git twitter.inc twitter.inc
index ca972a0..a3ef801 100644
--- twitter.inc
+++ twitter.inc
@@ -372,14 +372,6 @@ function _twitter_request_failure($results) {
  * @see twitter_cache_status()
  */
 function twitter_cache_account($twitter_account = array()) {
-  // convert boolean into int since it doesn't appear to be
-  // handled correctly otherwise
-  if ($twitter_account['protected']) {
-    $twitter_account['protected'] = 1;
-  }
-  else {
-    $twitter_account['protected'] = 0;
-  }
   
   db_query("DELETE FROM {twitter_account} WHERE twitter_uid = %n", $twitter_account['twitter_uid']);
   drupal_write_record('twitter_account', $twitter_account);
@@ -529,6 +521,11 @@ function _twitter_convert_user($user) {
   if (!empty($result['status']) && is_object($result['status'])) {
     $result['status'] = _twitter_convert_status($result['status']);
   }
+  // The returned xml values from twitter are string values, http://twitterapi.pbworks.com/Return-Values
+  // convert 'protected' value from true/false values into a boolean in the array.
+  if (isset($result['protected']))  {
+    $result['protected'] = ($result['protected'] == 'true') ? TRUE : FALSE;
+  }
   return $result;
 }
 
diff --git twitter.pages.inc twitter.pages.inc
index 69a3330..d40b97d 100644
--- twitter.pages.inc
+++ twitter.pages.inc
@@ -236,35 +236,19 @@ function twitter_add_account($form_state, $account = NULL) {
 function twitter_add_account_validate($form, &$form_state) {
   module_load_include('inc', 'twitter');
 
-  $verify = FALSE;
-
   $pass = $form_state['values']['password'];
   $name = $form_state['values']['screen_name'];
 
-  if (!empty($pass)) {
-    $verify = TRUE;
+  if (!isset($name)) {
+    form_set_error('screen_name', t('Twitter user name empty. Please fill the twitter user name and try again.'));
   }
 
-  if ($verify) {
-    $valid = twitter_authenticate($name, $pass);
-    if (!$valid) {
-      form_set_error("password", t('Twitter authentication failed. Please check your account name and try again.'));
-    }
+  if (!empty($pass) && !twitter_authenticate($name, $pass)) {
+    form_set_error('password', t('Twitter authentication failed. Please check your account name and try again.'));
   }
 }
 
 function twitter_add_account_submit($form, &$form_state) {
-  module_load_include('inc', 'twitter');
-
-  if (!empty($form_state['values']['screen_name'])) {
-    // if the password wasn't empty either get the account info
-    // so we can figure out if the account is protected
-    if (!empty($form_state['values']['password'])) {
-      $account = twitter_fetch_account_info($form_state['values']['screen_name'], $form_state['values']['password']);
-      if ($account['protected']) {
-        $form_state['values']['protected'] = TRUE;
-      }
-    }
-    twitter_user_save($form_state['values'], TRUE);
-  }
+  // Validation for the screen_name and a correct password done in the form validation phase
+  twitter_user_save($form_state['values'], TRUE);
 }
