Handle auth in router