fixed auth redirect to root and other stuff