Fixed user login with mongoDB