added button listener for main and join