Registration now works through AJAX. Client-side still needs fixing though