fixed mongo connection issue; typo in user function