implement login and logout with correct filter