improvements

+refactor
+saving Identity to DB