refactored and fix race condition
Merge pull request #6 from brandonwong90/user_info

refactored and fix race condition