integreate with user and chat services. add tests.