GRAILS-9923 removed use of withDefault
added error handling for malformed tokens