Removed useless toast
Added safe check for captive portal