As I see it, your trying to get your security level from your form (Which you have commented out). Secondly - did you add a security/authcode level to the database and get that on the call?
You need to add your auth codes to the database, and then assign that to your session variable...