fix security login/logout