login/logout handling modification & perfomance optimization
Merge branch 'master' of https://github.com/vasily-knk/chat