added log-in functionality