Fixed the passport's logging-in code