Fix sign-in menu not rendered before (whole document) loaded.
Fix sign-in menu not rendered before (whole document) loaded.

and merge APIs in auth.js

daftshady/dropbeat,daftshady/dropbeat,daftshady/dropbeat,daftshady/dropbeat