Is it legal to use an online logbook?
Short answer: an electronic logbook is legal; the FAA will accept almost anything as an endorsement; it's often most practical to collect endorsements on paper but electronic versions are also fine.
First, the fundamental point about logbook formats is that the FAA defines what you have to log (14 CFR 61.51), but not how you log it. And clearly electronic logbooks are &quot;legal&quot; in the sense that there's no law against using them.
However, I suspect that the main question you're asking is, how can I gather endorsements in an electronic logbook? AC 61-65E is essentially the FAA's practical guide to 14 CFR 61, and Appendix 1 lists recommended sample endorsements, with this comment:

The following examples are recommended sample endorsements for use by
authorized instructors when endorsing logbooks for airmen applying for
a knowledge or practical test, or when certifying accomplishment of
requirements for pilot operating privileges. Each endorsement must be
legible and include the instructor's signature, date of signature,
certificated flight instructor (CFI) or certificated ground instructor
(CGI) certificate number, and certificate expiration date, if
applicable.

So it's clear that you need a &quot;signature&quot; from your instructor and for most people that means paper. But you might start questioning what a &quot;signature&quot; really is and if you can substitute something else. Fortunately the FAA has an entire AC (AC 120-78) on electronic signatures that applies to part 61 and it says:

An electronic signature may be in the following forms.

A digital signature
A digitized image of a paper signature
A typed notation
An electronic code
Any other unique form of individual    identification that can be used as a means of authenticating a    record, record entry, or
document


That's a very broad definition of an electronic signature, although it seems clear that the FAA wants it to be &quot;individual&quot; and non-repudiation is a requirement:

An electronic signature should prevent a signatory from denying that
he or she affixed a signature to a specific record, record entry, or
document

However, there's also the practical question of how you collect endorsements. If you demand that your CFI creates an account in your logbook software, or generates his own digital certificate, or whatever else will make your electronic life easy, he may simply refuse. And how do get his endorsement when you're at that grass strip in the middle of nowhere with no cell signal or WiFi? How do you explain AC 120-78 to a skeptical DPE or FBO owner who's never heard of it before?
In the end, the simplest solution is often to just to get a physical signature on a piece of paper with all the necessary information as per AC 61-65E. If you then want to go digital and shred the paper, you can always scan it and add it to your electronic logbook as per AC 120-78.
But, if you want an electronic endorsement or signature and your CFI is willing to provide it, that's also fine. I use MyFlightbook for logging (no other connection and I'm not endorsing it) and their FAQ addresses whether electronic signatures are valid (links not preserved from the original):

The FAA does accept digital signatures, and outlines the criteria for
doing so in FAA circular AC No: 120-78A. While we believe MyFlightbook
is compliant with this AC (and we explain why we believe MyFlightbook
is compliant here), the FAA has thus far not indicated willingness to
even evaluate, much less certify, online logbook systems for
compliance.

My personal experience so far has been that DPEs have no problem with accepting electronic logbook printouts and endorsements. If something seemed suspicious then I assume they would investigate and ask some questions.