Use singleTask activity for loginActivity and fix the writing not work bug