added login/logout to the default layouts,and changed some redirections between pages