Update MainController.java

Also connect to db on aws