added passport and cleaned up some code.

WIP