updated index layout, updated password logic