Update login/logout behavior.