Made the frontend respond to login event from the server.