title: Facebook Login/Signup Help
body: <p>I have a site that uses FB Login/Signup button. This button is handled by JavaScript SDK. Also in the sign up page, I have another type of signup form. So basically, I have two ways on how to sign up on my site. </p>
  
  <p>Here is my Facebook Signup Code:</p>
  
  <pre><code>FB.init({ 
    appId:'xxxxxxxxx', 
    cookie:true, 
    status:true, 
    xfbml:true 
  });
  
  FB.Event.subscribe('auth.login', function() { processLogin() } );
  
  function processLogin(){
    if(FB.getSession() != null){ 
      FB.api('/me', function(user) {
        if(user != null) {
          #Ajax code here for inserting data to the database#
        }
      });
    }
  }
  </code></pre>
  
  <p>Now my problem is, whenever I'm currently logged in to my facebook account, and opt to do the conventional sign up form, the javascript function called 'processLogin' will be triggered without clicking the FB sign up button. I am still new to FB SDK, but I believe the <code>FB.Event.subscribe('auth.login', function() {processLogin()});</code> is causing the problem. How will I fix this problem? Any suggestion would be greatly appreciated.</p>
  
  <p>Thanks!</p>