Replaces sessions and our own loggedIn function to passport module.