got a somewhat working login that uses ajax.