changed error handling in passport strategies to match those used in functions