Handle spawn errors on spawn_as_logged_user.
Update alarm code. Removed references to the emitter mode, which doesn't apply in this case.