Fixing some auth bugs