added logout when logged in