added users and msg functionality