Fix auth bugs

Some small auth bugs due to porting JS files over to CoffeeScript