Removing unneccessary code
Returning to correct browser tab when authenticatioin finishes