Modifications to authentication.

Changes to implementation as agreed with Mthornell256
- Additional session variables created to remove the dependency of the
static Authentication class to manage state.