login/logout/registration implemented with bug