add log in functionality