[BUGFIX] Prevents exception in rare cases where user does not have correct type and cannot be fetched from repo after login