create auth cookie also if oid missing, no redirect to no-application.html
add mocha test case for oid not found
remove dead code