Further SQL and function changes

Added in function to verify length.  Fixed bugs, and added author notes.
Also created an 'update user' query.