added function of login(include session), logout, register but for test