improve user-password authentication, implement index controller