add test env and test code for sign in and direct message