separate cache class with invalidation

improve user registration with exceptions