How to keep login session when refreshing page in SPA