javascript - How to add a signIn button in a website and update it based on user authentication -
i working on playframework believe question more general topic of web implementation. creating website want put signin button on top right corner of home page , update based on user authentication. i.e. if user logged in there my profile , logout button , if not there signin button. know how implement using different pages uses different routes, in case can load complete page don't want load complete page instead use popup window signin/signup , want user redirect on same page after signing in ( click on signin -> signin form popup -> submit -> signed in ) url shouldn't changing in process. have seen type of design in many popular websites don't know how build one. i did research , found, can using jquery's ajax call. of ajax call can request data server in background (here request html) , update current page dom. in case supposed update dom of navbar's top right corner request html part don't know how it? new website designing, design or t...