added ''required'' to index username and password