adding login, logout, sessionState and heartbeat