setting user object in local storagey