handling signout through ajax