refactory auth service and add midware.js
add .gitignore
add .gitignore