Improved LoginProvider, added JavaDocs.