Added helper functions for authentication and transitions

The authenticateSession() helper reduces the amount of boilerplate code needed in scripts using the class.

The createId() helper is useful when working with transitions.