Fixed authentication to comply with the passport API