For the first step you do not need any Midlets because your 6131 has a UID which you could read out and use for authetification.
Write a Database and store the UID then write a Tool (java ,c#, c,or what ever) and connect to the Database. Each time the 6131 connects to the reader the tool must verify the UID in the Database to allow or deny access.
Second step: buuild up an encrypted connection. Now you need a Midlet that compares the keys or algorithme.
here some code examples:
http://wiki.forum.nokia.com/index.ph...mmon_use_cases