edit with log in function