Credit to @cwone

Fixed presence when the user goes online -> $type = "available"