update codes
fix login and index view controller