Login with Gmail do not redirects to .aspx page
<p>I am creating Google integrated asp.net web application. I want to fetch the list of Gmail </p>

<p>friends in my application. There is a login button named as LoginWithGoogle. when i click on </p>

<p>that button it redirects to Gmail login page. I want that when i click on login, it should </p>

<p>open a pop up window for gmail login just like facebook and redirects to my page known as </p>

<p>GmailFriends.aspx.</p>

<p>Here is my code which redirects me to Gmail login page:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function openForm() {
        window.open("https://accounts.google.com/ServiceLogin?service=mail&amp; 
        passive=true&amp;rm=false&amp;continue=https://mail.google.com/mail/&amp;ss=1&amp;scc=1&amp;
        ltmpl=default&amp;    ltmplcache=2&amp;hl=en");

    } 
&lt;/script&gt; 

&lt;asp:ImageButton ID="GoogleLogin" runat ="server" ImageUrl ="~/google_login.JPG"
 onclientclick="openForm();" xmlns:asp="#unknown" onlogin="window.location ='GmailFriends.aspx'" /&gt;
</code></pre>

<p>Can anyone help?</p>

<p>Thanks.</p>
