a generic login script