Update MainActivity.java

Updated to check if the user is registered with a shared preference object.