rewritten storeEvent
re-enabled login check and fixed import for rabbitMQ