Adds client-side onLogin and onLogout methods