User validation plus now working in add, edit and login mode