CLeaning loggin functions, update user metadata on login