logout working in ajax