Fixed token clear after changemail + added some testcases