Ordering check

C_Login() and C_Logout need to return CRYPTOKI_NOT_INITIALIZED when run too soon
Add a few more tests for incorrect ordering of login/logout
... and one more
Add missing check

All other lines in this function check the return value, except for this
one; that seems like a mistake.