Authentication offline commit with sharedpreferences