savita,
Another way to do this is to create an active user table with five records in it. Then when a user logs on, try to LOCK each record until you find one. Then when they exit the application release the lock - if they have connection problems or a system crash the file server will eventually release the lock. Of course, if you can't get a LOCK, you know all five user "slots" are in use and you can reject the log in.
Of course you can get fancy and put the SYS(0) information in the file so you know who's currently logged in. (e.g. Have an Administrator screen that allows you to view them!)
Rick