Authentication/Authorization flow in place

Get facebook user from provider
Does this facebook user exist in db?
if user exists, check if they're logged in
are logged in user and fb user the same?
if yes do nothing, otherwise merge and delete
If they're not logged in, do it
If theyre not in db, save new user