Fixed certificate auth and openstack

Updated session handling, now if certificate auth is enabled and
the client sends a session token, the server first checks the
certificate before checking the token.
Fixed reference errors in openstack library.