add pin route to home page,changed some login/logout logic