login and view mongodb