working db login via ajax