added mongodb and login functionalities