Refactor passport and routes