diff --git a/tests/core.test b/tests/core.test
index a70e831..99b4a40 100644
--- a/tests/core.test
+++ b/tests/core.test
@@ -33,7 +33,6 @@ class TwitterTest extends DrupalWebTestCase {
     // Create user
     $this->user = $this->drupalCreateUser(array(
       'add twitter accounts',
-      'import own tweets',
     ));
     $this->drupalLogin($this->user);
 
@@ -42,7 +41,7 @@ class TwitterTest extends DrupalWebTestCase {
       'screen_name' => 'drupal',
     );
     $this->drupalPost('user/' . $this->user->uid . '/edit/twitter',
-                      $edit, t('Add account'));
+      $edit, t('Add account'));
     $this->assertLink('drupal', 0,
       t('Twitter account was added successfully'));
 
diff --git a/twitter.lib.php b/twitter.lib.php
index b1639e6..c1b3f4b 100644
--- a/twitter.lib.php
+++ b/twitter.lib.php
@@ -44,10 +44,10 @@ class Twitter {
     }
   }
 
-  public function get_request_token() {
+  public function get_request_token($params = array()) {
     $url = variable_get('twitter_api', TWITTER_API) . '/oauth/request_token';
     try {
-      $params = array('oauth_callback' => url('twitter/oauth', array('absolute' => TRUE)));
+      $params += array('oauth_callback' => url('twitter/oauth', array('absolute' => TRUE)));
       $response = $this->auth_request($url, $params);
     }
     catch (TwitterException $e) {
diff --git a/twitter.pages.inc b/twitter.pages.inc
index 2a68c04..2e22256 100644
--- a/twitter.pages.inc
+++ b/twitter.pages.inc
@@ -338,9 +338,12 @@ function twitter_auth_account_form_validate($form, &$form_state) {
 function twitter_auth_account_form_submit($form, &$form_state) {
   $key = variable_get('twitter_consumer_key', '');
   $secret = variable_get('twitter_consumer_secret', '');
+  $callback_url =  url('twitter/oauth', array('absolute' => TRUE));
+
   $twitter = new Twitter($key, $secret);
-  $token = $twitter->get_request_token();
-  if ($token) {
+  $params = array('oauth_callback' => $callback_url);
+  $token = $twitter->get_request_token($params);
+  if (!empty($token)) {
     $_SESSION['twitter_oauth']['token'] = $token;
     $_SESSION['twitter_oauth']['destination'] = $_GET['q'];
     // Check for the overlay.
@@ -423,7 +426,7 @@ function twitter_oauth_callback_form_validate($form, &$form_state) {
 
   module_load_include('inc', 'twitter');
 
-  if ($twitter = new Twitter($key, $secret, $token['oauth_token'], $token['oauth_token_secret'])) {
+  if (!empty($token) && $twitter = new Twitter($key, $secret, $token['oauth_token'], $token['oauth_token_secret'])) {
     //Collect oauth_verifier from url
     if ($response = $twitter->get_access_token($_GET['oauth_verifier'])) {
       $form_state['twitter_oauth']['response'] = $response;
diff --git a/twitter_signin/twitter_signin.module b/twitter_signin/twitter_signin.module
index f20e271..835af4e 100644
--- a/twitter_signin/twitter_signin.module
+++ b/twitter_signin/twitter_signin.module
@@ -83,7 +83,12 @@ function twitter_signin_redirect() {
   $key = variable_get('twitter_consumer_key', '');
   $secret = variable_get('twitter_consumer_secret', '');
   $twitter = new Twitter($key, $secret);
-  $token = $twitter->get_request_token();
+
+  // Specify a callback_url when generating our token that will match the
+  // current domain.
+  $callback_url =  url('twitter/oauth', array('absolute' => TRUE));
+  $params = array('oauth_callback' => $callback_url);
+  $token = $twitter->get_request_token($params);
 
   $_SESSION['twitter_oauth']['token'] = $token;
   $_SESSION['twitter_oauth']['destination'] = $_SERVER['HTTP_REFERER'];
