adding ajax script for login and register