added login, logout and register