implement LOGIN for mta
missing bits
Merge branch 'master' into portable