addede login and logout handling