Adding redirects.
Close the window to free memory
Add cookie headers on redirects