fixing passport middleware