moved auth to it's own js file and updated a LOT in it