Added new user system and fixed some bugs