Added enhanced authentication checking

Fixed a bug that would cause confusion when you signed in on a
different computer. Instead of logging you out from a previous session,
the system would carry on and not let you know what happened. Often
leaving pages partially displayed because of permission.