Problem is that the GMail interface loads itself into a FRAME! So when you follow the link it doesn't actually change the top page, but just the frame url... just set top.location.href instead of really following that link and you should be fine.