Complete of log-in and mongdb database functionality

1. can check log-in
2. can manage session
conflict resolved