implement passport-local strategy

Read the comments in the .js files for a bit of quick understanding.