Update main.c

Created Log functions for admin and users