executing scripts at login and logout