a generic-purposed script to automate logins