Adding log in function, but doesn't display log in