fixed redirect bug in authenticate route