added login to tesla program
put login program in a function
Merge pull request #13 from echen027/master

Added login program for tesla