Login modal, fixes to LoginAPI