modified script with angular js, working with views. validation for username and content still not complete