Add scripts for connecting home.
Fix logic bug.