fixed the error that occured while creating newuser after logout