add support for auth
Merge pull request #4 from pwyliu/master

support for auth