update login form and sqlfunction