added login, register, logout