Reformatting code to use popout for oauth login