Mmmm No, I´m not create an error handler! That´s a good point.
In the other hand, it's a very simple login, just check users.dbf and if the user is found, get the info for 2 vars, user that stores the user_number to record any movement and user_level that specify wich modules the user can access.
Hope this can give you a clue.
By two common phrases in his vocabulary, we know Hercule Poirot was a great Developer: his use of "the little grey cells" and "order and method".