Added the ability to logout and neatened up the error messages displayed...

... a bit. (Still needs a better solution)