Corrected errors after login

The logic to update the auth settings in the db needed null checks when
doing adds