Added login functionality with mongo