Add log in functionality.