Updated to check if session cookie is available, if not then an error ap...

...pears telling you to log in.