Fixed button order in main activity and added location check for viewLocation