Update main.c

Define and create create_log() function
Define and create search_client() function
Re-define Login functions