Text this: How to Authenticate a Device? Formal Authentication Models for M2M Communications Defending against Ghost Compromising Attack