added login form and JS ajax calls