Save uid instead of name + better ajax
oops
Proper user login