added login f() prototype + log f()