fixed bug when user logs in for the first time.