Redirect to login page, if not logged in
Refactor rootpopup