Changed the structure of controller (action.php)

Added visits log functionality