fixed login, logout and register