modified register-login-logout