Added error codes to AuthToken class

The exceptions thrown now have a code int associated with them, and the meanings are defined as class constants