Fixed JSON logging. TODO: Logg beacon events
Updated logger and logger tests