Added display of potential error message.
Attempted to extract cookie to avoid login on each request but cookie is set with http only which prevents it from being read from javascript.
Compute safeName in constructor as property and use it.