fixed messages, leave function/log out and more