fixed url parameters and added cookies to preserve tab status