as you mentioned on your comment you are using <a> tag
use preventDefault
to prevent the default action
this should work
$(document).ready(function() {
var intervalID = null;
var win = null
$("#flogin").click(function(event){
event.preventDefault(); //prevents the default action
win = window.open('/auth/facebook','location=yes, scrollbars=yes, width=640, height=359', true);
intervalID = setInterval(function(){
if(win.closed){
location.reload();
}
}, 100);
});
});