Added login, logout and checkConnection