added login function
Merge origin/master