Authentication now through ajax, registration and login fixes