fixed nedb authentication