redid login; much simpler