Added state to user object
Added user state to User object. Some refactoring for User state.