added logout before login