Made MainActivity connect to the server and get dynamic data.