Works better, still need to firgure out the AJAX form part for register